/**
 * @since Last modified: 2024-07-11 09:30:49
 * @constant moreOptMap
 * @description The map of attributes and properties about more class. 
 */
'use strict';
import { T_obj } from '../../../types/ax';
import ax from '../ax';
const baseOptMap: T_obj[] = [
    {
        attr: 'ins-name',
        prop: 'insName',
        value: '',
    },
    {
        attr: 'on-init',
        prop: 'onInit',
        value: null,
    },
    {
        attr: 'on-destroy',
        prop: 'onDestroy',
        value: null,
    },
];
const updateOptMap: T_obj[] = [
    {
        attr: 'stor-name',
        prop: 'storName',
        value: '',
    },
    {
        attr: 'on-update',
        prop: 'onUpdate',
        value: null,
    },
    {
        attr: 'on-save',
        prop: 'onSave',
        value: null,
    },
    {
        attr: 'on-reset',
        prop: 'onReset',
        value: null,
    },
];
const commonOptMap: T_obj[] = [
    ...baseOptMap,
    ...updateOptMap,
    {
        attr: 'breakpoints',
        prop: 'breakpoints',
        value: {},
    },
]
export const moreOptMap: T_obj[] = [
    ...commonOptMap,
    {
        attr: 'storage-keys',
        prop: 'storKeys',
        value: ['content', 'length', 'folded'],
    },
    {
        attr: 'content',
        prop: 'content',
        value: ''
    },
    {
        attr: 'length',
        prop: 'length',
        value: 60,
    },
    {
        attr: 'folded',
        prop: 'folded',
        value: true,
    },
    {
        attr: 'text-fold',
        prop: 'textFold',
        value: ax.lang.more.fold,
    },
    {
        attr: 'text-unfold',
        prop: 'textUnfold',
        value: ax.lang.more.unfold,
    },
    {
        attr: 'class-fold',
        prop: 'classFold',
        value: `${ax.pfx}c-prim`,
    },
    {
        attr: 'class-unfold',
        prop: 'classUnfold',
        value: `${ax.pfx}c-prim`,
    },
    {
        attr: 'on-fold',
        prop: 'onFold',
        value: null,
    },
    {
        attr: 'on-unfold',
        prop: 'onUnfold',
        value: null,
    },
    {
        attr: 'on-updatecont',
        prop: 'onUpdateCont',
        value: null,
    },
];
export const alertOptMap: T_obj[] = [
    ...commonOptMap,
    {
        attr: 'storage-keys',
        prop: 'storKeys',
        value: ['content', 'caption', 'icon'],
    },
    {
        attr: 'caption',
        prop: 'caption',
        value: ''
    },
    {
        attr: 'content',
        prop: 'content',
        value: ''
    },
    {
        attr: 'theme',
        prop: 'theme',
        value: 'warn',
    },
    {
        attr: 'borderless',
        prop: 'borderless',
        value: false,
    },
    {
        attr: 'square',
        prop: 'square',
        value: false,
    },
    {
        attr: 'classes',
        prop: 'classes',
        value: '',
    },
    {
        attr: 'icon',
        prop: 'icon',
        value: '',
    },
    {
        attr: 'closable',
        prop: 'closable',
        value: false,
    },
    {
        attr: 'notable',
        prop: 'notable',
        value:  false,
    },
    {
        attr: 'display',
        prop: 'display',
        value:  '',
    },
    {
        attr: 'on-show',
        prop: 'onShow',
        value: null,
    },
    {
        attr: 'on-hide',
        prop: 'onHide',
        value: null,
    },
    {
        attr: 'on-clear',
        prop: 'onClear',
        value: null,
    },
    {
        attr: 'on-updatecont',
        prop: 'onUpdateCont',
        value: null,
    },
];
export const popupOptMap: T_obj[] = [
    ...commonOptMap,
    {
        attr: 'storage-keys',
        prop: 'storKeys',
        value: ['content', 'placement', 'size', 'in', 'out', 'multiple', 'height'],
    },
    {
        attr: 'heading',
        prop: 'heading',
        value: '',
    },
    {
        attr: 'divider',
        prop: 'divider',
        value: false,
    },
    {
        attr: 'placement',
        prop: 'placement',
        value: 'top',
    },
    {
        attr: 'trigger',
        prop: 'trigger',
        value: 'click',
    },
    {
        attr: 'page-close',
        prop: 'pageClose',
        value: true,
    },
    {
        attr: 'size',
        prop: 'size',
        value: 'md',
    },
    {
        attr: 'duration',
        prop: 'duration',
        value: 0,
    },
    {
        attr: 'in',
        prop: 'in',
        value: 'fadeIn',
    },
    {
        attr: 'out',
        prop: 'out',
        value: 'fadeOut',
    },
    {
        attr: 'multiple',
        prop: 'multiple',
        value: false,
    },
    {
        attr: 'stay',
        prop: 'stay',
        value: false,
    },
    {
        attr: 'classes',
        prop: 'classes',
        value: '', 
    },
    {
        attr: 'height',
        prop: 'height',
        value: '',
    },
    {
        attr: 'padding',
        prop: 'padding',
        value: `${ax.pfx}p`,
    },
    {
        attr: 'content',
        prop: 'content',
        value: '',
    },
    {
        attr: 'cont-type',
        prop: 'contType',
        value: 'text',
    },
    {
        attr: 'ajax-type',
        prop: 'ajaxType',
        value: 'post',
    },
    {
        attr: 'cont-data',
        prop: 'contData',
        value: {},
    },
    {
        attr: 'act-class',
        prop: 'actClass',
        value: `${ax.pfx}opened`,
    },
    {
        attr: 'tpl-str',
        prop: 'tplStr',
        value: '',
    },
    {
        attr: 'tpl-eng',
        prop: 'tplEng',
        value: null,
    },
    {
        attr: 'trigger-only',
        prop: 'triggerOnly',
        value: false,
    },
    {
        attr: 'trigger-strict',
        prop: 'triggerStrict',
        value: false,
    },
    {
        attr: 'z-index',
        prop: 'zIndex',
        value: 0,
    },
    {
        attr: 'response',
        prop: 'response',
        value: true,
    },
    {
        attr: 'breakpoints',
        prop: 'breakpoints',
        value: {},
    },
    {
        attr: 'position',
        prop: 'position',
        value: {},
    },
    {
        attr: 'media',
        prop: 'media',
        value: {
            caption: '',
            brief: '',
        },
    },
    {
        attr: 'arrow',
        prop: 'arrow',
        value: {
            enable: true,
            offset: '2.8rem',
            gap: '.8rem',
        }
    },
    {
        attr: 'wing',
        prop: 'wing',
        value: {
            selector: '',
            trigger: 'click',
            triggerClass: '',
        },
    },
    {
        attr: 'tools',
        prop: 'tools',
        value:  {
            enable: true,
            placement: 'inside',
            children: ['close']
        },
       /*  {
            enable: true,
            placement: 'inside',
            children: [],
        }, */
    },
    {
        attr: 'footer',
        prop: 'footer',
        value:{
            enable: true,
            layout: 'plain',
            note: false,
            divider: false,
            padding: false,
            children: ['cancel', 'confirm']
        }
        /* {
            enable: true,
            layout: 'plain',
            attrs: {},
            note: {
                enable: false,
                nodeName: '',
                html: '',
                attrs: {}
            },
            divider: {
                enable: false,
                nodeName: '',
                attrs: {}
            },
            padding: {
                enable: false,
                nodeName: '',
                attrs: {}
            },
            children: [],
        }, */
    },
    {
        attr: 'on-beforefill',
        prop: 'onBeforeFill',
        value: null,
    },
    {
        attr: 'on-beforeshow',
        prop: 'onBeforeShow',
        value: null,
    },
    {
        attr: 'on-beforehide',
        prop: 'onBeforeHide',
        value: null,
    },
    {
        attr: 'on-show',
        prop: 'onShow',
        value: null,
    },
    {
        attr: 'on-hide',
        prop: 'onHide',
        value: null,
    },
    {
        attr: 'on-valid',
        prop: 'onValid',
        value: null,
    },
    {
        attr: 'on-updatecont',
        prop: 'onUpdateCont',
        value: null,
    },
    {
        attr: 'on-updateposition',
        prop: 'onUpdatePosition',
        value: null,
    },
    {
        attr: 'on-confirm',
        prop: 'onConfirm',
        value: null,
    },
    {
        attr: 'on-cancel',
        prop: 'onCancel',
        value: null,
    },
]
export const dodgeOptMap: T_obj[] = [
    ...baseOptMap,
    {
        attr: 'placeholder',
        prop: 'placeholder',
        value: '',
    },
    {
        attr: 'on-set',
        prop: 'onSet',
        value: null,
    },
    {
        attr: 'on-cancel',
        prop: 'onCancel',
        value: null,
    },
]
