<?php


return  
    [
        'model' => [
            'model' => \Bixo\Account\Models\Ledger::class,
            'table' => 'bixo_account_ledgers',
            'hidden'=> [],
            'visible' => [],
            'guarded' => ['*'],
            'slugs' => ['slug' => 'name'],
            'dates' => ['deleted_at', 'created_at', 'updated_at'],
            'appends' => [],
            'fillable' => ['coa_id',  'ledgerable_id',  'ledgerable_type',  'company_id',  'branch_id',  'date',  'name',  'description',  'debit',  'credit',  'currency',  'currency_rate',  'currency_value',  'user_id'],
            'translatables' => [],
            'upload_folder' => 'account/ledger',
            'uploads' => [
            /*
                    'images' => [
                        'count' => 10,
                        'type'  => 'image',
                    ],
                    'file' => [
                        'count' => 1,
                        'type'  => 'file',
                    ],
            */
            ],

            'casts' => [
            
            /*
                'images'    => 'array',
                'file'      => 'array',
            */
            ],

            'revision' => [],
            'perPage' => '20',
            'search'        => [
                'name'  => 'like',
                'status',
            ]
        ],

        'search' => [
            
        ],

        'list' => [
            [
                "key" => "coa_id", 
                "type" => "text", 
                "label" => 'account::ledger.label.coa_id', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "ledgerable_id", 
                "type" => "text", 
                "label" => 'account::ledger.label.ledgerable_id', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "ledgerable_type", 
                "type" => "text", 
                "label" => 'account::ledger.label.ledgerable_type', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "company_id", 
                "type" => "text", 
                "label" => 'account::ledger.label.company_id', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "branch_id", 
                "type" => "text", 
                "label" => 'account::ledger.label.branch_id', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "date", 
                "type" => "text", 
                "label" => 'account::ledger.label.date', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "name", 
                "type" => "text", 
                "label" => 'account::ledger.label.name', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "description", 
                "type" => "text", 
                "label" => 'account::ledger.label.description', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "debit", 
                "type" => "text", 
                "label" => 'account::ledger.label.debit', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "credit", 
                "type" => "text", 
                "label" => 'account::ledger.label.credit', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "currency", 
                "type" => "text", 
                "label" => 'account::ledger.label.currency', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "currency_rate", 
                "type" => "text", 
                "label" => 'account::ledger.label.currency_rate', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "currency_value", 
                "type" => "text", 
                "label" => 'account::ledger.label.currency_value', 
                'sort' => true,
                'roles' => [],
            ],
        ],

        'form' => [
            [
                "key" => 'coa_id',
                "element" => 'numeric',
                "type" => 'numeric',
                "label" => 'account::ledger.label.coa_id',
                "placeholder" => 'account::ledger.placeholder.coa_id',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'ledgerable_id',
                "element" => 'numeric',
                "type" => 'numeric',
                "label" => 'account::ledger.label.ledgerable_id',
                "placeholder" => 'account::ledger.placeholder.ledgerable_id',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'ledgerable_type',
                "element" => 'text',
                "type" => 'text',
                "label" => 'account::ledger.label.ledgerable_type',
                "placeholder" => 'account::ledger.placeholder.ledgerable_type',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'company_id',
                "element" => 'numeric',
                "type" => 'numeric',
                "label" => 'account::ledger.label.company_id',
                "placeholder" => 'account::ledger.placeholder.company_id',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'branch_id',
                "element" => 'text',
                "type" => 'text',
                "label" => 'account::ledger.label.branch_id',
                "placeholder" => 'account::ledger.placeholder.branch_id',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'date',
                "element" => 'date_time_picker',
                "type" => 'date_time_picker',
                "label" => 'account::ledger.label.date',
                "placeholder" => 'account::ledger.placeholder.date',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'name',
                "element" => 'text',
                "type" => 'text',
                "label" => 'account::ledger.label.name',
                "placeholder" => 'account::ledger.placeholder.name',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'description',
                "element" => 'text',
                "type" => 'text',
                "label" => 'account::ledger.label.description',
                "placeholder" => 'account::ledger.placeholder.description',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'debit',
                "element" => 'decimal',
                "type" => 'decimal',
                "label" => 'account::ledger.label.debit',
                "placeholder" => 'account::ledger.placeholder.debit',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'credit',
                "element" => 'decimal',
                "type" => 'decimal',
                "label" => 'account::ledger.label.credit',
                "placeholder" => 'account::ledger.placeholder.credit',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'currency',
                "element" => 'text',
                "type" => 'text',
                "label" => 'account::ledger.label.currency',
                "placeholder" => 'account::ledger.placeholder.currency',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'currency_rate',
                "element" => 'decimal',
                "type" => 'decimal',
                "label" => 'account::ledger.label.currency_rate',
                "placeholder" => 'account::ledger.placeholder.currency_rate',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'currency_value',
                "element" => 'decimal',
                "type" => 'decimal',
                "label" => 'account::ledger.label.currency_value',
                "placeholder" => 'account::ledger.placeholder.currency_value',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
        ],

        'urls' => [
            'new' => [
                'url' => 'account/ledger/new',
                'method' => 'GET',
            ],
            'create' => [
                'url' => 'account/ledger/create',
                'method' => 'GET',
            ],
            'store' => [
                'url' => 'account/ledger',
                'method' => 'POST',
            ],
            'update' => [
                'url' => 'account/ledger',
                'method' => 'PUT',
            ],
            'list' => [
                'url' => 'account/ledger',
                'method' => 'GET',
            ],
            'delete' => [
                'url' => 'account/ledger',
                'method' => 'DELETE',
            ],
        ],

        'order' => [
            'created_at' => 'account::ledger.label.created_at',
            'name' => 'account::ledger.label.name',
            'status' => 'account::ledger.label.status',
        ],

        'groups' => [
            [
                'icon' => "mdi:account-supervisor-outline",
                'name' => "account::ledger.groups.main",
                'group' => "main.main",
                'title' => "account::ledger.groups.main",
            ],
            [
                'icon' => "fe:home",
                'name' => "account::ledger.groups.details",
                'group' => "main.details",
                'title' => "account::ledger.groups.details",
            ],
            'images' => [
                'icon' => "fe:home",
                'name' => "account::ledger.groups.images",
                'group' => "main.images",
                'title' => "account::ledger.groups.images",
            ],
            'settings' => [
                'icon' => "fe:home",
                'name' => "account::ledger.groups.settings",
                'group' => "main.settings",
                'title' => "account::ledger.groups.settings",
            ]
        ],

        'controller' => [
            'provider' => 'Bixo',
            'package' => 'Account',
            'module' => 'Ledger',
        ],

        
        
    ];