<?php

namespace App\View\Components;

use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;

class DataTable extends Component
{
    public string $id;
    public array $columns;
    public bool $checkbox;
    public ?string $footer;

    public function __construct(
        string $id = 'data-table',
        array $columns = [],
        bool $checkbox = true,
        ?string $footer = null
    ) {
        $this->id = $id;
        $this->columns = $columns;
        $this->checkbox = $checkbox;
        $this->footer = $footer;
    }

    public function render(): View
    {
        return view('components.data-table');
    }
}
