<?php

namespace Ebuy\Product\Forms;

use Litepie\Form\FormInterpreter;

class Brand extends FormInterpreter
{

    /**
     * Sets the form and form elements.
     * @return null.
     */
    public static function setAttributes()
    {

        self::$urls = [
            'new' => [
                'url' => guard_url('product/brand/new'),
                'method' => 'GET',
            ],
            'create' => [
                'url' => guard_url('product/brand/create'),
                'method' => 'GET',
            ],
            'store' => [
                'url' => guard_url('product/brand'),
                'method' => 'POST',
            ],
            'update' => [
                'url' => guard_url('product/brand'),
                'method' => 'PUT',
            ],
            'list' => [
                'url' => guard_url('product/brand'),
                'method' => 'GET',
            ],
            'delete' => [
                'url' => guard_url('product/brand'),
                'method' => 'DELETE',
            ],
        ];
        self::$search = [
            'name' => [
                "type" => 'text',
                "label" => trans('product::product.label.name'),
                "placeholder" => trans('product::product.placeholder.name'),
                "rules" => '',
                "group" => "main",
                "section" => "first",
                "col" => "4",
                "roles" => [],
            ]
        ];
        self::$orderBy = [
            'created_at' => trans('product::product.label.created_at'),
            'name' => trans('product::product.label.name'),
            'status' => trans('product::product.label.status'),
        ];
        self::$groups = [
            'main' => trans('product::product.groups.main'),
            'details' => trans('product::product.groups.details'),
            'images' => trans('product::product.groups.images'),
            'settings' => trans('product::product.groups.settings'),
        ];
        self::$list = [
            [
                'key' => "ref",
                'label' => trans('product::product.label.ref'),
                'sortable' => 'true',
                'roles' => [],
            ],
            [
                'key' => "id",
                'label' => trans('product::product.label.id'),
                'sortable' => 'true',
                'roles' => [],
            ],
            [
                'key' => "name",
                'label' => trans('product::product.label.name'),
                'sortable' => 'true',
                'roles' => [],
            ],
            [
                'key' => "status",
                'label' => trans('product::product.label.status'),
                'sortable' => 'true',
                'roles' => [],
            ],
        ];
        self::$fields = [
                'name' => [
                "element" => 'text',
                "type" => 'text',
                "label" => trans('product::brand.label.name'),
                "placeholder" => trans('product::brand.placeholder.name'),
                "rules" => '',
                "group" => "main",
                "section" => "first",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            'description' => [
                "element" => 'text',
                "type" => 'text',
                "label" => trans('product::brand.label.description'),
                "placeholder" => trans('product::brand.placeholder.description'),
                "rules" => '',
                "group" => "main",
                "section" => "first",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            'image' => [
                "element" => 'text',
                "type" => 'text',
                "label" => trans('product::brand.label.image'),
                "placeholder" => trans('product::brand.placeholder.image'),
                "rules" => '',
                "group" => "main",
                "section" => "first",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
        ];

        return new static();
    }
}