/**
 * ldesign v0.4.6
 * (c) 2023 ldesign
 * @license MIT
 */

'use strict';

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

var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var VueCompositionAPI = require('@vue/composition-api');
var hooks_useConfig = require('../../hooks/useConfig.js');
var hooks_tnode = require('../../hooks/tnode.js');
require('../../config-provider/useConfig.js');
require('../../config-provider/context.js');
require('lodash/merge');
require('lodash/mergeWith');
require('../../_common/js/global-config/default-config.js');
require('../../_common/js/global-config/locale/zh_CN.js');
require('@babel/runtime/helpers/typeof');
require('../../_chunks/dep-7c884501.js');
require('dayjs');
require('lodash/isEmpty');
require('lodash/isFunction');
require('lodash/camelCase');
require('lodash/kebabCase');
require('../../hooks/render-tnode.js');
require('lodash/isString');
require('lodash/isObject');

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

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

var propHandler = {
  type: Function,
  "default": function _default() {
    return function () {};
  }
};
var TImageViewerIcon = VueCompositionAPI.defineComponent({
  name: "TImageModalIcon",
  props: {
    disabled: Boolean,
    clickHandler: propHandler,
    label: String,
    icon: Function
  },
  setup: function setup(props) {
    var classPrefix = hooks_useConfig.usePrefixClass();
    var renderTNodeJSX = hooks_tnode.useTNodeJSX();
    var wrapClass = VueCompositionAPI.computed(function () {
      return ["".concat(classPrefix.value, "-image-viewer__modal-icon"), _defineProperty__default["default"]({}, "".concat(classPrefix.value, "-is-disabled"), props.disabled)];
    });
    return {
      wrapClass: wrapClass,
      classPrefix: classPrefix,
      renderTNodeJSX: renderTNodeJSX
    };
  },
  render: function render() {
    var h = arguments[0];
    return h("div", {
      "class": this.wrapClass,
      "on": {
        "click": this.clickHandler
      }
    }, [this.renderTNodeJSX("icon"), this.label && h("span", {
      "class": "".concat(this.classPrefix, "-image-viewer__modal-icon-label")
    }, [this.label])]);
  }
});

exports["default"] = TImageViewerIcon;
//# sourceMappingURL=ImageModalIcon.js.map
