<?php


return  
    [
        'model' => [
            'model' => \Bixo\Whatsapp\Models\Chat::class,
            'table' => 'bixo_whatsapp_chats',
            'hidden'=> [],
            'visible' => [],
            'guarded' => ['*'],
            'slugs' => ['slug' => 'name'],
            'dates' => ['deleted_at', 'created_at', 'updated_at'],
            'appends' => [],
            'fillable' => ['user_id',  'agent_phone',  'client_phone',  'client_name',  'chanel',  'direction',  'type',  'message',  'media',  'opp_id'],
            'translatables' => [],
            'upload_folder' => 'whatsapp/chat',
            '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" => "agent_phone", 
                "type" => "text", 
                "label" => 'whatsapp::chat.label.agent_phone', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "client_phone", 
                "type" => "text", 
                "label" => 'whatsapp::chat.label.client_phone', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "client_name", 
                "type" => "text", 
                "label" => 'whatsapp::chat.label.client_name', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "chanel", 
                "type" => "text", 
                "label" => 'whatsapp::chat.label.chanel', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "direction", 
                "type" => "text", 
                "label" => 'whatsapp::chat.label.direction', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "type", 
                "type" => "text", 
                "label" => 'whatsapp::chat.label.type', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "media", 
                "type" => "text", 
                "label" => 'whatsapp::chat.label.media', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "opp_id", 
                "type" => "text", 
                "label" => 'whatsapp::chat.label.opp_id', 
                'sort' => true,
                'roles' => [],
            ],
        ],

        'form' => [
            [
                "key" => 'agent_phone',
                "element" => 'text',
                "type" => 'text',
                "label" => 'whatsapp::chat.label.agent_phone',
                "placeholder" => 'whatsapp::chat.placeholder.agent_phone',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

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

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

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

                ],
            ],
            [
                "key" => 'direction',
                "element" => 'radios',
                "type" => 'radios',
                "label" => 'whatsapp::chat.label.direction',
                "placeholder" => 'whatsapp::chat.placeholder.direction',
                "rules" => '',
                "options" => function(){
                    return trans('whatsapp::chat.options.direction');
                },
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

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

                ],
            ],
            [
                "key" => 'message',
                "element" => 'html_editor',
                "type" => 'html_editor',
                "label" => 'whatsapp::chat.label.message',
                "placeholder" => 'whatsapp::chat.placeholder.message',
                "rules" => '',
                "group" => "main.main",
                "col" => "12",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

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

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

                ],
            ],
        ],

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

        'order' => [
            'created_at' => 'whatsapp::chat.label.created_at',
            'name' => 'whatsapp::chat.label.name',
            'status' => 'whatsapp::chat.label.status',
        ],

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

        'controller' => [
            'provider' => 'Bixo',
            'package' => 'Whatsapp',
            'module' => 'Chat',
        ],

        
        
    ];