<?php

namespace App\Admin\Actions\Form;

use Dcat\Admin\Form\AbstractTool;
use Dcat\Admin\Widgets\Modal;

class ToothLog extends AbstractTool
{
    /**
     * @return string
     */
    protected $title = '长牙记录';

    protected $model;

    public function __construct(string $model = null, $id = 0)
    {
        $this->model = $model;
        $this->title = $this->title;
        $this->id = $id;
    }

    public function render()
    {
        $form = ToothLogForm::make()->payload(['id' => $this->id]);
        return Modal::make()
            ->lg()
            ->title($this->title)
            ->body($form)
            ->button($this->title);
    }

}
