<?php

defined('ABSPATH') or die('No script kiddies please!!');
if (!class_exists('STD_Init')) {

    class STD_Init {

        function __construct() {
            add_action('plugins_loaded', array($this, 'load_textdomain'));
            add_action('init', array($this, 'init_tasks')); // executed on init hook
        }

        function load_textdomain() {
            load_plugin_textdomain(STD_TD, false, STD_LANGUAUGE_PATH);
        }

        function init_tasks() {
           

            /**
             * Fires when Init hook is fired through plugin
             *
             * @since 1.0.0
             */
            do_action('std_init');

            $custom_field_type_list = array(
                'textfield' => array('label' => esc_html__('Textfield', 'subscribe-to-download'), 'icon' => 'fas fa-edit'),
                'textarea' => array('label' => esc_html__('Textarea', 'subscribe-to-download'), 'icon' => 'fas fa-expand'),
                'select' => array('label' => esc_html__('Select Dropdown', 'subscribe-to-download'), 'icon' => 'far fa-caret-square-down'),
                'checkbox' => array('label' => esc_html__('Checkbox', 'subscribe-to-download'), 'icon' => 'far fa-check-square'),
                'radio' => array('label' => esc_html__('Radio Button', 'subscribe-to-download'), 'icon' => 'far fa-dot-circle'),
                'number' => array('label' => esc_html__('Number', 'subscribe-to-download'), 'icon' => 'fas fa-sort'),
                'datepicker' => array('label' => esc_html__('Datepicker', 'subscribe-to-download'), 'icon' => 'far fa-calendar-alt'),
                'url' => array('label' => esc_html__('URL', 'subscribe-to-download'), 'icon' => 'fas fa-globe-asia'),
                'tel' => array('label' => esc_html__('Tel', 'subscribe-to-download'), 'icon' => 'fas fa-phone'),
                'hidden' => array('label' => esc_html__('Hidden', 'subscribe-to-download'), 'icon' => 'far fa-minus-square')
            );
            if (!defined('STD_CUSTOM_FIELD_TYPE_LIST')) {
                define('STD_CUSTOM_FIELD_TYPE_LIST', $custom_field_type_list);
            }
        }

    }

    new STD_Init();
}