report = $report; } public function getColumns(): array { return $this->report->fields; } public function getPdfView(): string { return 'components.company.reports.report-pdf'; } public function getAlignmentClass(int $index): string { $column = $this->getColumns()[$index]; if ($column->getAlignment() === Alignment::Right) { return 'text-right'; } if ($column->getAlignment() === Alignment::Center) { return 'text-center'; } return 'text-left'; } public function toLivewire(): array { return [ 'report' => $this->report->toLivewire(), ]; } public static function fromLivewire($value): static { return new static( ReportDTO::fromLivewire($value['report']), ); } }