/**
 * ldesign v0.2.2
 * (c) 2022年9月20日 swimly
 * @license MIT
 */

'use strict';

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

var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var VueCompositionAPI = require('@vue/composition-api');
var components_popup_index = require('../popup/index.js');
var hooks_useConfig = require('../../hooks/use-config.js');
var components_rangeInput_rangeInput = require('./range-input.js');
var components_rangeInput_props = require('./props.js');
var components_selectInput_hooks_useOverlayInnerstyle = require('../select-input/hooks/use-overlay-innerstyle.js');
require('../popup/popup.js');
require('@babel/runtime/helpers/typeof');
require('@popperjs/core');
require('../../chunks/set-style.js');
require('../../utils/dom.js');
require('vue');
require('raf');
require('lodash/isString');
require('../../utils/easing.js');
require('../../utils/render-node.js');
require('lodash/camelCase');
require('lodash/kebabCase');
require('../../utils/helper.js');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/slicedToArray');
require('../popup/props.js');
require('../popup/container.js');
require('../config-provider/config-receiver.js');
require('lodash/mergeWith');
require('lodash');
require('../config-provider/context.js');
require('../../chunks/zh_CN.js');
require('../../utils/mixins.js');
require('../../utils/map-props.js');
require('../../utils/with-install.js');
require('../../config.js');
require('../config-provider/useConfig.js');
require('@ldesign/icons-vue');
require('../input/index.js');
require('../input/input.js');
require('@babel/runtime/helpers/toConsumableArray');
require('../../chunks/helper2.js');
require('../../utils/event.js');
require('../input/props.js');
require('../input/group.js');
require('../../hooks/use-vmodel.js');
require('../../hooks/use-global-icon.js');
require('../../hooks/lnode.js');
require('lodash/isEmpty');
require('lodash/isFunction');
require('../../hooks/render-lnode.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: "LRangeInputPopup",
  props: components_rangeInput_props.RangeInputPopupProps,
  components: {
    LPopup: components_popup_index.Popup
  },
  setup: function setup(props2) {
    var COMPONENT_NAME = hooks_useConfig.usePrefixClass("range-input-popup");

    var _useOverlayInnerStyle = components_selectInput_hooks_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("l-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(components_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
