<?php

    return [
        "type"           => "tariff",
        "model"          => App\Models\Tariff::class,
        "label"          => "Tariffs",
        "label_singular" => "Tariff",
        "group"          => "tariffs",
        "order"          => TRUE,
        "fields"         => [
            [
                "name"          => "title",
                "label"         => "Title",
                "type"          => "textBox",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|max:150",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE
            ],
            [
                "name"          => "type",
                "label"         => "Tariff Type",
                "type"          => "selectBox",
                "list" => array(
                    "roaming" => "Roaming",
                    "regular" => "Regular",
                    "gratis"  => "Regular Gratis",
                    "spacer"  => "Empty line"
                ),
                "placement" => "sidebar",
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|in:roaming,regular,gratis,spacer",
                "inList"        => TRUE
            ],
            [
                "name"          => "roaming_object",
                "label"         => "Roaming Tariff",
                "type"          => "selectBox",
                "list" => array(
                    "call"  => "Call",
                    "sms"   => "SMS",
                    "mms"   => "MMS",
                    "data"  => "Data"
                ),
                "placement" => "sidebar",
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "nullable|in:call,sms,mms,data",
                "inList"        => TRUE,
                "parent"      => [
                    "name"   => "type",
                    "values" => [
                        "roaming",
                    ]
                ]
            ],
            [
                "name"          => "roaming_type",
                "label"         => "Roaming Type",
                "type"          => "selectBox",
                "list" => array(
                    "to_base" => "To base country (swiss)",
                    "to_same" => "To same country",
                    "to_r1"   => "To R1 country",
                    "to_r2"   => "To R2 country",
                    "to_r3"   => "To R3 country",
                    "from"    => "Incoming",
                    "to"      => "Outgoing",
                    "data"    => "UPLOAD / DOWNLOAD"
                ),
                "placement" => "sidebar",
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "nullable|in:to_base,to_same,to_r1,to_r2,to_r3,from,to,data",
                "inList"        => TRUE,
                "parent"      => [
                    "name"   => "type",
                    "values" => [
                        "roaming",
                    ]
                ]
            ],
            [
                "name"          => "price_text",
                "label"         => "Price text",
                "type"          => "textBox",
                "maxLength"     => 150,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:150",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE,
                "parent"      => [
                    "name"   => "type",
                    "values" => [
                        "regular",
                    ]
                ]
            ],
            [
                "name"          => "price_1",
                "label"         => "Price R1",
                "type"          => "textBox",
                "maxLength"     => 8,
                "multiLanguage" => FALSE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "numeric|nullable|max:150",
                "nullable"      => TRUE,
                "inList"        => TRUE,
                "parent"      => [
                    "name"   => "type",
                    "values" => [
                        "roaming",
                    ]
                ]
            ],
            [
                "name"          => "price_2",
                "label"         => "Price R2",
                "type"          => "textBox",
                "maxLength"     => 8,
                "multiLanguage" => FALSE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "numeric|nullable|max:150",
                "nullable"      => TRUE,
                "inList"        => TRUE,
                "parent"      => [
                    "name"   => "type",
                    "values" => [
                        "roaming",
                    ]
                ]
            ],
            [
                "name"          => "price_3",
                "label"         => "Price R3",
                "type"          => "textBox",
                "maxLength"     => 8,
                "multiLanguage" => FALSE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "numeric|nullable|max:150",
                "nullable"      => TRUE,
                "inList"        => TRUE,
                "parent"      => [
                    "name"   => "type",
                    "values" => [
                        "roaming",
                    ]
                ]
            ],
        ],
        "actions"        => [
            "edit", "order", "insert", "delete"
        ]
    ];
