'use strict';

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

var vue = require('vue');

var script = {
    props: {
        canClose: {
            type: Boolean,
            default: true,
        },
        close: {
            type: Function,
            required: true,
        },
    },
    name: "TsModal",
    setup(props) {
        const closeModal = () => {
            if (props.canClose) {
                props.close();
            }
        };
        return {
            closeModal,
        };
    },
};

const _hoisted_1 = { class: "py-3 relative w-full flex flex-row justify-center items-center h-full overflow-y-auto" };

function render(_ctx, _cache, $props, $setup, $data, $options) {
  return (vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
    vue.createVNode(vue.Transition, {
      name: "fade",
      appear: ""
    }, {
      default: vue.withCtx(() => [
        vue.createElementVNode("div", {
          class: "fixed top-0 w-screen h-screen bg-black bg-opacity-60 flex flex-col px-4 overflow-y-auto",
          style: {"z-index":"9999999999999999"},
          onClick: _cache[0] || (_cache[0] = $event => ($setup.closeModal()))
        }, [
          vue.createElementVNode("div", _hoisted_1, [
            vue.renderSlot(_ctx.$slots, "default")
          ])
        ])
      ]),
      _: 3 /* FORWARDED */
    })
  ]))
}

script.render = render;
script.__file = "src/components/TsModal/index.vue";

exports["default"] = script;
