import { createBlock as r, openBlock as c, Transition as m, withCtx as b, withDirectives as u, createElementVNode as e, renderSlot as p, vShow as f } from "vue";
/* empty css           */
import _ from "../../../_virtual/_plugin-vue_export-helper.js";
const h = ["data-theme"], k = {
  class: "modal",
  role: "dialog",
  "aria-labelledby": "modalTitle",
  "aria-describedby": "modalDescription"
}, v = {
  id: "modalDescription",
  class: "modal-body"
}, y = { class: "buttons" }, g = ["aria-disabled", "disabled"], C = {
  __name: "Modal",
  props: {
    theme: {
      type: String,
      required: !1,
      default: "light"
    },
    okDisabled: {
      type: Boolean,
      required: !1,
      default: !1
    }
  },
  emits: ["close", "submit"],
  setup(s, { emit: d }) {
    const o = d, l = s, i = (a) => {
      a.target.classList.contains("modal-backdrop") && o("close");
    };
    return (a, t) => (c(), r(m, { name: "modal-fade" }, {
      default: b(() => [
        u(e("div", {
          class: "modal-backdrop",
          "data-theme": s.theme,
          onClick: i
        }, [
          e("div", k, [
            e("div", v, [
              p(a.$slots, "default", {}, void 0, !0)
            ]),
            e("div", y, [
              e("button", {
                type: "button",
                class: "btn-green",
                "aria-label": "Close modal",
                "aria-disabled": l.okDisabled ? "true" : "false",
                disabled: l.okDisabled,
                onClick: t[0] || (t[0] = (n) => o("submit"))
              }, " OK ", 8, g),
              e("button", {
                type: "button",
                class: "btn-green btn-gray",
                "aria-label": "Close modal",
                onClick: t[1] || (t[1] = (n) => o("close"))
              }, " Cancel ")
            ])
          ])
        ], 8, h), [
          [f, !0]
        ])
      ]),
      _: 3
    }));
  }
}, B = /* @__PURE__ */ _(C, [["__scopeId", "data-v-6f045439"]]);
export {
  B as default
};
