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

'use strict';

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

var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var VueCompositionAPI = require('@vue/composition-api');
var popup_index = require('../popup/index.js');
var hooks_useConfig = require('../hooks/useConfig.js');
var rangeInput_rangeInput = require('./range-input.js');
var rangeInput_rangeInputPopupProps = require('./range-input-popup-props.js');
var selectInput_useOverlayInnerStyle = require('../select-input/useOverlayInnerStyle.js');
require('../popup/popup.js');
require('@babel/runtime/helpers/typeof');
require('@popperjs/core');
require('../utils/dom.js');
require('vue');
require('raf');
require('lodash/isString');
require('../utils/easing.js');
require('../utils/render-tnode.js');
require('lodash/camelCase');
require('lodash/kebabCase');
require('../utils/helper.js');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/slicedToArray');
require('../_common/js/utils/set-style.js');
require('../popup/props.js');
require('../popup/container.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('../utils/map-props.js');
require('../utils/withInstall.js');
require('lodash/capitalize');
require('../config-provider/useConfig.js');
require('tdesign-icons-vue');
require('../input/index.js');
require('../input/input.js');
require('@babel/runtime/helpers/toConsumableArray');
require('../_common/js/utils/helper.js');
require('../utils/event.js');
require('../input/props.js');
require('../input/input-group.js');
require('./props.js');
require('../hooks/useVModel.js');
require('../hooks/useGlobalIcon.js');
require('../hooks/tnode.js');
require('lodash/isEmpty');
require('lodash/isFunction');
require('../hooks/render-tnode.js');
require('lodash/isObject');

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

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 _RangeInputPopup = VueCompositionAPI.defineComponent({
  name: "TRangeInputPopup",
  props: rangeInput_rangeInputPopupProps["default"],
  setup: function setup(props2) {
    var COMPONENT_NAME = hooks_useConfig.usePrefixClass("range-input-popup");

    var _useOverlayInnerStyle = selectInput_useOverlayInnerStyle["default"](props2),
        tOverlayInnerStyle = _useOverlayInnerStyle.tOverlayInnerStyle,
        innerPopupVisible = _useOverlayInnerStyle.innerPopupVisible,
        onInnerPopupVisibleChange = _useOverlayInnerStyle.onInnerPopupVisibleChange;

    var popupClasses = VueCompositionAPI.computed(function () {
      return [COMPONENT_NAME.value, _defineProperty__default["default"]({}, "".concat(COMPONENT_NAME.value, "--visible"), props2.popupVisible || innerPopupVisible.value)];
    });
    return {
      COMPONENT_NAME: COMPONENT_NAME,
      tOverlayInnerStyle: tOverlayInnerStyle,
      innerPopupVisible: innerPopupVisible,
      onInnerPopupVisibleChange: onInnerPopupVisibleChange,
      popupClasses: popupClasses
    };
  },
  render: function render() {
    var h = arguments[0];
    var tOverlayInnerStyle = this.tOverlayInnerStyle,
        innerPopupVisible = this.innerPopupVisible,
        onInnerPopupVisibleChange = this.onInnerPopupVisibleChange,
        popupClasses = this.popupClasses;
    return h("div", {
      "class": popupClasses
    }, [h(popup_index.Popup, {
      "attrs": {
        "hideEmptyPopup": true,
        "content": this.panel,
        "trigger": "click",
        "placement": "bottom-left",
        "visible": this.popupVisible || innerPopupVisible
      },
      "props": _objectSpread({}, _objectSpread({
        disabled: this.disabled,
        overlayInnerStyle: tOverlayInnerStyle,
        onVisibleChange: onInnerPopupVisibleChange
      }, this.popupProps))
    }, [h(rangeInput_rangeInput["default"], {
      "props": _objectSpread({}, _objectSpread({
        value: this.inputValue,
        onChange: this.onInputChange,
        disabled: this.disabled,
        status: this.status,
        tips: this.tips
      }, this.rangeInputProps))
    })])]);
  }
});

exports["default"] = _RangeInputPopup;
//# sourceMappingURL=range-input-popup.js.map
