import { t } from "../../src/locale";
import { CComputedSetter } from "../_setters";
import loopData from "../_com-props/loopData";
import snippets from "./snippets";
import { hiddenBoxType } from "../../src/components/hidden-box/type";
export default {
  snippets: snippets,
  componentName: 'HiddenBox',
  "group": t('hidden-box.key_QNpo3HzzQCyW'),
  title: t('hidden-box.key_KFHsRkEOmAS2'),
  category: t('hidden-box.key_Lwdy1am1cDdb'),
  props: [loopData, {
    name: 'conditions',
    title: {
      label: t('hidden-box.key_nj82BkPLWUbL'),
      tip: t('hidden-box.key_mJy0yPuIUcKi')
    },
    propType: {
      type: 'oneOf',
      value: [hiddenBoxType.show, hiddenBoxType.hidden]
    },
    setter: [{
      componentName: 'SelectSetter',
      props: {
        options: [{
          title: t('hidden-box.key_e1goE3zhMOpC'),
          value: hiddenBoxType.show
        }, {
          title: t('hidden-box.key_23XgAycbaYhP'),
          value: hiddenBoxType.hidden
        }]
      }
    }],
    supportVariable: false
  }, {
    name: 'hidden',
    title: {
      label: t('hidden-box.key_8HlEPvZLagXb'),
      tip: t('hidden-box.key_rhRB7tTDWT6p')
    },
    propType: 'string',
    defaultValue: {},
    setter: CComputedSetter,
    condition: function condition(target) {
      return target.parent.getPropValue('conditions') === hiddenBoxType.hidden;
    }
  }, {
    name: 'show',
    title: {
      label: t('hidden-box.key_kM5CZvwLSDZZ'),
      tip: t('hidden-box.key_gjb2VlMD7mRc')
    },
    propType: 'string',
    defaultValue: {},
    setter: CComputedSetter,
    condition: function condition(target) {
      return target.parent.getPropValue('conditions') === hiddenBoxType.show;
    }
  }, {
    name: 'destroyOnClose',
    title: {
      label: t('drawer.key_gclwYZgCKC0B'),
      tip: t('drawer.key_QMH4LbCBeG3m')
    },
    propType: 'bool',
    defaultValue: true,
    setter: 'BoolSetter'
  }],
  configure: {
    component: {
      isContainer: true
    },
    supports: {
      events: false,
      style: true,
      "loop": false,
      "condition": false
    }
  }
};