/**
 * tdesign v0.46.4
 * (c) 2022 tdesign
 * @license MIT
 */

'use strict';

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

var helper = require('../_chunks/dep-d7a1e02c.js');
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var VueCompositionAPI = require('@vue/composition-api');
var colorPicker_props = require('./props.js');
var colorPicker_panel_index = require('./panel/index.js');
var configProvider_useConfig = require('../config-provider/useConfig.js');
var hooks_useVModel = require('../hooks/useVModel.js');
require('@babel/runtime/helpers/toConsumableArray');
require('../hooks/useCommonClassName.js');
require('./panel/header.js');
require('../radio/index.js');
require('../radio/radio.js');
require('vue');
require('../utils/helper.js');
require('@babel/runtime/helpers/objectWithoutProperties');
require('lodash/camelCase');
require('../utils/render-tnode.js');
require('@babel/runtime/helpers/typeof');
require('lodash/kebabCase');
require('../radio/props.js');
require('../utils/event.js');
require('../config-provider/config-receiver.js');
require('lodash/mergeWith');
require('../config-provider/context.js');
require('lodash/merge');
require('../_common/js/global-config/default-config.js');
require('../_common/js/global-config/locale/zh_CN.js');
require('../utils/mixins.js');
require('../radio/group.js');
require('lodash/isString');
require('lodash/isNumber');
require('../radio/radio-group-props.js');
require('../radio/radio-button.js');
require('../utils/map-props.js');
require('../utils/withInstall.js');
require('lodash/capitalize');
require('./hooks.js');
require('../hooks/useConfig.js');
require('../_common/js/color-picker/constants.js');
require('./panel/linear-gradient.js');
require('lodash/cloneDeep');
require('../input-number/index.js');
require('../input-number/input-number.js');
require('tdesign-icons-vue');
require('../button/index.js');
require('../button/button.js');
require('../loading/index.js');
require('../loading/loading.js');
require('../loading/icon/gradient.js');
require('../_common/js/loading/circle-adapter.js');
require('../_common/js/utils/set-style.js');
require('../_common/js/utils/helper.js');
require('../utils/dom.js');
require('raf');
require('../utils/easing.js');
require('../utils/transfer-dom.js');
require('../loading/props.js');
require('../loading/plugin.js');
require('../config.js');
require('../button/props.js');
require('../utils/ripple.js');
require('../input/index.js');
require('../input/input.js');
require('../input/props.js');
require('../input/input-group.js');
require('../input-number/props.js');
require('../input-number/useInputNumber.js');
require('../_common/js/input-number/number.js');
require('../_common/js/input-number/large-number.js');
require('../_common/js/log/log.js');
require('../hooks/useFormDisabled.js');
require('../hooks/useGlobalIcon.js');
require('./panel/base-props.js');
require('../_common/js/color-picker/color.js');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('tinycolor2');
require('../_common/js/color-picker/cmyk.js');
require('../_common/js/color-picker/gradient.js');
require('./panel/saturation.js');
require('../select/index.js');
require('../select/select.js');
require('lodash/isFunction');
require('lodash/debounce');
require('lodash/get');
require('lodash/isArray');
require('../hooks/useDefaultValue.js');
require('../hooks/tnode.js');
require('lodash/isEmpty');
require('../hooks/render-tnode.js');
require('lodash/isObject');
require('../select/props.js');
require('../popup/index.js');
require('../popup/popup.js');
require('@popperjs/core');
require('../popup/props.js');
require('../popup/container.js');
require('../tag/index.js');
require('../tag/tag.js');
require('../tag/props.js');
require('../tag/check-tag.js');
require('../tag/check-tag-props.js');
require('../select-input/index.js');
require('../select-input/select-input.js');
require('../select-input/props.js');
require('../select-input/useSingle.js');
require('lodash/pick');
require('../select-input/useMultiple.js');
require('../tag-input/index.js');
require('../tag-input/tag-input.js');
require('../tag-input/props.js');
require('../tag-input/hooks/useTagScroll.js');
require('../tag-input/useTagList.js');
require('../tag-input/hooks/useHover.js');
require('../tag-input/hooks/useDragSorter.js');
require('../select-input/useOverlayInnerStyle.js');
require('../common-components/fake-arrow.js');
require('../select/option.js');
require('../select/option-props.js');
require('../checkbox/index.js');
require('../checkbox/group.js');
require('lodash/intersection');
require('../checkbox/checkbox.js');
require('../checkbox/props.js');
require('../checkbox/checkbox-group-props.js');
require('../hooks/useLazyLoad.js');
require('../_common/js/utils/observe.js');
require('../select/util.js');
require('../select/select-panel.js');
require('../hooks/useVirtualScroll.js');
require('../select/hooks/useSelectOptions.js');
require('../select/optionGroup.js');
require('../select/option-group-props.js');
require('../_common/js/color-picker/draggable.js');
require('./panel/hue.js');
require('./panel/slider.js');
require('./panel/alpha.js');
require('./panel/format/index.js');
require('lodash/upperCase');
require('./const.js');
require('./panel/format/inputs.js');
require('lodash/throttle');
require('./panel/format/config.js');
require('./panel/swatches.js');
require('lodash');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var _ColorPickerPanel = VueCompositionAPI.defineComponent({
  name: "TColorPickerPanel",
  components: {
    ColorPanel: colorPicker_panel_index["default"]
  },
  inheritAttrs: false,
  props: _objectSpread({}, colorPicker_props["default"]),
  setup: function setup(props2) {
    var prefix = configProvider_useConfig.usePrefixClass();

    var _toRefs = VueCompositionAPI.toRefs(props2),
        value = _toRefs.value;

    var _useVModel = hooks_useVModel["default"](value, props2.defaultValue, props2.onChange, "change"),
        _useVModel2 = _slicedToArray__default["default"](_useVModel, 2),
        innerValue = _useVModel2[0],
        setInnerValue = _useVModel2[1];

    var handleChange = function handleChange(value2, context) {
      setInnerValue(value2, context);
    };

    return {
      prefix: prefix,
      innerValue: innerValue,
      setInnerValue: setInnerValue,
      handleChange: handleChange
    };
  },
  render: function render() {
    var h = arguments[0];
    var prefix = this.prefix,
        innerValue = this.innerValue,
        handleChange = this.handleChange;
    return h("color-panel", helper.helper([{
      "props": _objectSpread({}, _objectSpread(_objectSpread({}, this.$props), {}, {
        closeBtn: false,
        popupProps: null,
        value: innerValue
      }))
    }, {
      "on": {
        change: handleChange
      }
    }, {
      "class": "".concat(prefix, "-is-inline")
    }]));
  }
});

exports["default"] = _ColorPickerPanel;
//# sourceMappingURL=color-picker-panel.js.map
