'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var antDesignVue = require('ant-design-vue');
var useTabMixin = require('../../config/use-tab-mixin.js');

"use strict";
var _sfc_main = vue.defineComponent({
  name: "DayUI",
  components: { InputNumber: antDesignVue.InputNumber, RadioGroup: antDesignVue.RadioGroup, Radio: antDesignVue.Radio, CheckboxGroup: antDesignVue.CheckboxGroup, Checkbox: antDesignVue.Checkbox },
  props: {
    ...useTabMixin.useTabProps({
      defaultValue: "*"
    }),
    week: {
      type: String,
      default: "?"
    },
    disabled: {
      type: Boolean,
      default: false
    }
  },
  emits: useTabMixin.useTabEmits(),
  setup(props, context) {
    const disabledChoice = vue.computed(() => {
      return props.week && props.week !== "?" || props.disabled;
    });
    const setup = useTabMixin.useTabSetup(props, context, {
      defaultValue: "*",
      valueWork: 1,
      minValue: 1,
      maxValue: 31,
      valueRange: { start: 1, end: 31 },
      valueLoop: { start: 1, interval: 1 },
      disabled: disabledChoice
    });
    const typeWorkAttrs = vue.computed(() => ({
      disabled: setup.type.value !== useTabMixin.TypeEnum.work || props.disabled || disabledChoice.value,
      ...setup.inputNumberAttrs.value
    }));
    vue.watch(
      () => props.week,
      () => {
        setup.updateValue(disabledChoice.value ? "?" : setup.computeValue.value);
      }
    );
    return { ...setup, typeWorkAttrs };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=day-ui.vue2.js.map
