<?php

namespace App\Orchid\Layouts\Category;

use Orchid\Screen\Field;
use Orchid\Screen\Fields\Input;
use Orchid\Screen\Layouts\Rows;
use Orchid\Screen\Fields\Select;

class CategoryEditLayout extends Rows {
  /**
   * Used to create the title of a group of form elements.
   *
   * @var string|null
   */
  protected $title;

  /**
   * Get the fields elements to be displayed.
   *
   * @return Field[]
   */
  protected function fields(): iterable {
    return [
      Input::make('category.name')
        ->placeholder('Category name')
        ->title('Name'),

      Input::make('category.image')
        ->type('file')
        ->title('Image'),
    ];
  }
}
