<?php

    /*
    |--------------------------------------------------------------------------
    | Pagesettings definitions
    |--------------------------------------------------------------------------
    |
    | These values are used to define the standard, default values for each
    | settings used by the site. These values are used to populate the database
    | with the default values.
    | 
    | This settings file also contains the validation rules for each setting.
    |
    */

return [
    'defaults' => [
        'site_name' => 'Østfold Milsim',
        'site_description' => 'Østfold Milsim er en airsoftklubb som holder til i Østfold. Vi har medlemmer fra hele Østfold, og har som mål å være en klubb for alle som er interessert i airsoft.',
        'site_keywords' => 'airsoft, milsim, østfold, norge, norway, airsoftklubb, airsoftklubb østfold, airsoftklubb norge, airsoftklubb norway, airsoftklubb østfold milsim, airsoftklubb norge milsim, airsoftklubb norway milsim, airsoftklubb østfold milsim norge, airsoftklubb norge milsim østfold, airsoftklubb norway milsim østfold, airsoftklubb østfold milsim norway, airsoftklubb norge milsim norway, airsoftklubb norway milsim østfold',

        'webmaster' => 'Webmasters Navn',
        'webmaster_email' => 'ikke@ikke.no',
        'webmaster_phone' => '12345678',
        'kasserer' => 'Vet Ikke',
        'kasserer_email' => 'vet.ikke@ikke.no',
        'kasserer_phone' => '12345678',
        'postadresse' => 'Østfold Milsim, Postboks 123, 1234 Oslo',
        'besoksadresse' => 'Østfold Milsim, Østfoldveien 123, 1234 Oslo',
        'orgnr' => '123456789',
        'bankkontonr' => '1234.56.78901',
        'banknavn' => 'Østfold Milsim Bank',

        'facebook' => 'https://www.facebook.com/ostfoldmilsim',
        'instagram' => 'https://www.instagram.com/ostfoldmilsim',
        'twitter' => 'https://www.twitter.com/ostfoldmilsim',
        'youtube' => 'https://www.youtube.com/ostfoldmilsim',
        'twitch' => 'https://www.twitch.tv/ostfoldmilsim',
        'discord' => 'https://www.discord.gg/ostfoldmilsim',
        
        'membership_fee' => '500',
        'membership_time_interval_months' => '12',
        'membership_fee_description' => 'Årlig medlemskontigent',
        'membership_fee_description_long' => 'Årlig medlemskontigent for medlemskap i Østfold Milsim',
        'membership_child_age_limit' => '18',
        'membership_child_fee' => '250',
        'membership_age_limit' => '16',
        'membership_annual' => true,
        'renew_alert' => '4',
        'sales_terms' => '# Salgsbetingelser for Klubben',
        'use_terms' => '# Bruksvilkår for Klubben',
        'privacy_policy' => '# Personvernerklæring for Klubben',
        'comment_rules' => '# Regler for kommentering',
        'enable_vat' => false,

        'module_vipps_payment' => false,
        'module_stripe_payment' => false,
        'module_registrationcodes' => false,
        'module_required_full_profile' => false,
        'module_mobile_app_scan_notification' => false,
        'mobile_app_scan_notification_message' => '',
        'mobile_app_scan_notification_threshold' => 1,

        'mobile_app_welcome_text' => '',
        'mobile_app_background_color' => '#003e71',
        'mobile_app_text_color' => '#ffffff',
        'mobile_app_header_color' => '#40c4ff',
        'mobile_app_appbar_background_color' => '#0085f2',
        'mobile_app_appbar_text_color' => '#ffffff',
        'mobile_app_navigation_background_color' => '#ffffff',
        'mobile_app_navigation_icon_color' => '#9E9E9E',
        'mobile_app_navigation_active_icon_color' => '#0085f2',
        'mobile_app_input_color' => '#ffffff',
        'mobile_app_input_accent_color' => '#40c4ff',
        'mobile_app_logo' => 0,

        'membership_levels' => [],
    ],

    'department_defaults' => [
        'membership_fee' => '500',
        'membership_child_fee' => '250',
        'membership_time_interval_months' => '12',
        'membership_fee_description' => 'Årlig medlemskontigent',
        'membership_fee_description_long' => 'Årlig medlemskontigent for medlemskap i Østfold Milsim',
    ],

    'department_defaults_fieldTypes' => [
        'membership_fee' => 'number',
        'membership_time_interval_months' => 'number',
        'membership_fee_description' => 'text',
        'membership_fee_description_long' => 'textarea',
    ],

    'department_defaults_validation' => [
        'deptId' => [
            'required',
            'integer',
            'exists:departments,id',
        ],
        'membership_fee' => [
            'required',
            'numeric',
            'digits_between:1,6',
        ],
        'membership_child_fee' => [
            'required',
            'numeric',
            'digits_between:1,6',
        ],
        'membership_time_interval_months' => [
            'required',
            'numeric',
            'digits_between:1,2',
        ],
        'membership_fee_description' => [
            'required',
            'string',
            'max:255',
        ],
        'membership_fee_description_long' => [
            'required',
            'string',
        ],
    ],

    'validation' => [
        'site_name' => [
            'required',
            'string',
            'max:255',
        ],
        'site_description' => [
            'required',
            'string',
        ],
        'site_keywords' => [
            'required',
            'string',
        ],
        'webmaster' => [
            'required',
            'string',
            'max:255',
        ],
        'webmaster_email' => [
            'required',
            'string',
            'email',
            'max:255',
        ],
        'webmaster_phone' => [
            'required',
            'numeric',
            'digits:8',
        ],
        'kasserer' => [
            'required',
            'string',
            'max:255',
        ],
        'kasserer_email' => [
            'required',
            'string',
            'email',
            'max:255',
        ],
        'kasserer_phone' => [
            'required',
            'numeric',
            'digits:8',
        ],
        'postadresse' => [
            'required',
            'string',
            'max:255',
        ],
        'besoksadresse' => [
            'required',
            'string',
            'max:255',
        ],
        'orgnr' => [
            'required',
            'numeric',
            'digits:9',
        ],
        'bankkontonr' => [
            'required',
            'string',
            'max:13',
        ],
        'banknavn' => [
            'nullable',
            'string',
            'max:255',
        ],
        'facebook' => [
            'nullable',
            'string',
            'max:255',
        ],
        'instagram' => [
            'nullable',
            'string',
            'max:255',
        ],
        'twitter' => [
            'nullable',
            'string',
            'max:255',
        ],
        'youtube' => [
            'nullable',
            'string',
            'max:255',
        ],
        'twitch' => [
            'nullable',
            'string',
            'max:255',
        ],
        'discord' => [
            'nullable',
            'string',
            'max:255',
        ],
        'membership_fee' => [
            'required',
            'numeric',
            'digits_between:1,6',
        ],
        'membership_time_interval_months' => [
            'required',
            'numeric',
            'digits_between:1,2',
        ],
        'membership_fee_description' => [
            'required',
            'string',
            'max:255',
        ],
        'membership_fee_description_long' => [
            'required',
            'string',
        ],
        'membership_child_age_limit' => [
            'required',
            'numeric',
            'digits_between:1,2',
        ],
        'membership_child_fee' => [
            'required',
            'numeric',
            'digits_between:1,6',
        ],
        'membership_age_limit' => [
            'required',
            'numeric',
            'digits_between:1,2',
        ],
        'membership_annual' => [
            'nullable',
            'boolean',
        ],
        'renew_alert' => [
            'required',
            'numeric',
            'digits_between:1,12',
        ],
        'sales_terms' => [
            'required',
            'string',
        ],
        'use_terms' => [
            'required',
            'string',
        ],
        'privacy_policy' => [
            'required',
            'string',
        ],
        'mobile_app_background_color' => [
            'required',
            'string',
            'regex:/^#([a-f0-9]{3}){1,2}$/i',
        ],
        'mobile_app_text_color' => [
            'required',
            'string',
            'regex:/^#([a-f0-9]{3}){1,2}$/i',
        ],
        'mobile_app_header_color' => [
            'required',
            'string',
            'regex:/^#([a-f0-9]{3}){1,2}$/i',
        ],
        'mobile_app_logo' => [
            'nullable',
            'integer',
            'exists:image_nodes,id',
        ],
        'mobile_app_appbar_background_color' => [
            'required',
            'string',
            'regex:/^#([a-f0-9]{3}){1,2}$/i',
        ],
        'mobile_app_appbar_text_color' => [
            'required',
            'string',
            'regex:/^#([a-f0-9]{3}){1,2}$/i',
        ],
        'mobile_app_navigation_background_color' => [
            'required',
            'string',
            'regex:/^#([a-f0-9]{3}){1,2}$/i',
        ],
        'mobile_app_navigation_icon_color' => [
            'required',
            'string',
            'regex:/^#([a-f0-9]{3}){1,2}$/i',
        ],
        'mobile_app_navigation_active_icon_color' => [
            'required',
            'string',
            'regex:/^#([a-f0-9]{3}){1,2}$/i',
        ],
        'mobile_app_input_color' => [
            'required',
            'string',
            'regex:/^#([a-f0-9]{3}){1,2}$/i',
        ],
        'mobile_app_input_accent_color' => [
            'required',
            'string',
            'regex:/^#([a-f0-9]{3}){1,2}$/i',
        ],

        'membership_levels' => [
            'array'
        ],

        'mobile_app_scan_notification_message' => [
            'required_if:module_mobile_app_scan_notification,true',
            'max:255'
        ],

        'mobile_app_scan_notification_threshold' => [
            'required_if:module_mobile_app_scan_notification,true',
            'between:1,99'
        ]
    ]
];