/**
 * ldesign v0.2.14
 * (c) 2022/11/2 16:16 built by swimly
 * @license MIT
 */

'use strict';

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

var VueCompositionAPI = require('@vue/composition-api');
var hooks_useConfig = require('../../../hooks/use-config.js');
var hooks_lnode = require('../../../hooks/lnode.js');
require('../../config-provider/useConfig.js');
require('../../config-provider/context.js');
require('lodash');
require('../../../chunks/zh_CN.js');
require('lodash/isEmpty');
require('lodash/isFunction');
require('lodash/camelCase');
require('lodash/kebabCase');
require('../../../hooks/render-lnode.js');

const propHandler = {
  type: Function,
  default() {
    return () => {};
  }
};
var TImageViewerIcon = VueCompositionAPI.defineComponent({
  name: "LImageModalIcon",
  props: {
    disabled: Boolean,
    clickHandler: propHandler,
    label: String,
    icon: Function
  },
  setup(props) {
    const classPrefix = hooks_useConfig.usePrefixClass();
    const renderLNodeJSX = hooks_lnode.useLNodeJSX();
    const wrapClass = VueCompositionAPI.computed(() => [`${classPrefix.value}-image-viewer__modal-icon`, {
      [`${classPrefix.value}-is-disabled`]: props.disabled
    }]);
    return {
      wrapClass,
      classPrefix,
      renderLNodeJSX
    };
  },
  render() {
    const h = arguments[0];
    return h("div", {
      "class": this.wrapClass,
      "on": {
        "click": this.clickHandler
      }
    }, [this.renderLNodeJSX("icon"), this.label && h("span", {
      "class": `${this.classPrefix}-image-viewer__modal-icon-label`
    }, [this.label])]);
  }
});

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