<?php

return [
    "type"           => "map_information",
    "model"          => App\Models\MapInformation::class,
    "label"          => "Map Informations",
    "label_singular" => "Map Information",
    "group"          => "none",
    "order"          => FALSE,
    "showSlug"       => FALSE,
    "parent" =>[
        "field" => "map_item_id",
        "contentType" => "map_item"
    ],
    "fields"         => [
        [
            "name"          => "title",
            "label"         => "Title",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:250",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE,
        ],
        [
            "name"          => "counterparty_type",
            "label"         => "Counterparty Type",
            "type"          => "selectBox",
            "list"          => [
                "corporate_corporate" => "Corporate-Corporate",
                "bank_corporate" => "Bank-Corporate",
                "bank_bank" => "Bank-Bank",
            ],
            "defaultValue"  => "corporate_corporate",
            "preValidation" => "trim",
            "validation"    => "in:corporate_corporate,bank_corporate,bank_bank",
        ],
        [
            "name"          => "counterparty_comment",
            "label"         => "Counterparty Comment",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "xss_clean|trim",
            "validation"    => "",
        ],
        [
            "name"          => "settlement_type",
            "label"         => "Settlement Type",
            "type"          => "selectBox",
            "list"          => [
                "physical"  => "Physical",
                "financial" => "Financial",
            ],
            "defaultValue"  => "physical",
            "preValidation" => "trim",
            "validation"    => "in:physical,financial",
        ],
        [
            "name"          => "relevant_commodity",
            "label"         => "Relevant Commodity",
            "type"          => "selectBox",
            "list"          => [
                "power_gas" => "Power/Gas",
                "co2_allowances"  => "CO2 Allowances",
                "green_certificates"  => "Green Certificates",
                "mixed_portfolio"  => "Mixed Portfolio",
            ],
            "defaultValue"  => "power_gas",
            "preValidation" => "trim",
            "validation"    => "in:power_gas,co2_allowances,green_certificates,mixed_portfolio",
        ],
        [
            "name"          => "color",
            "label"         => "Color",
            "type"          => "selectBox",
            "list"          => [
                "green" => "Green",
                "yellow"  => "Yellow",
                "red"  => "Red",
                "none"  => "None",
            ],
            "defaultValue"  => "none",
            "preValidation" => "trim",
            "validation"    => "in:green,yellow,red,none",
        ],
        [
            "name"          => "comment",
            "label"         => "Comment",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "xss_clean|trim",
            "validation"    => "",
        ],
    ],
    "actions"        => [
        "edit", "insert", "delete"
    ]
];
