import { c as w, g as A, i as D, T as R, a as E, b as y, p as M, P as p, d as h, e as I, s as B, D as H, l as U, f as Y, h as j, j as q, k as x, S as C, L as G, n as W, t as z, o as F, q as J } from "./render-WE5K9D05.js";
let g = !1;
function K(e) {
  var r = g;
  try {
    return g = !1, [e(), g];
  } finally {
    g = r;
  }
}
const Q = (
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
  globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
    /** @param {string} html */
    createHTML: (e) => e
  })
);
function V(e) {
  return (
    /** @type {string} */
    Q?.createHTML(e) ?? e
  );
}
function X(e) {
  var r = w("template");
  return r.innerHTML = V(e.replaceAll("<!>", "<!---->")), r.content;
}
function Z(e, r) {
  var i = (
    /** @type {Effect} */
    E
  );
  i.nodes === null && (i.nodes = { start: e, end: r, a: null, t: null });
}
// @__NO_SIDE_EFFECTS__
function $(e, r) {
  var i = (r & R) !== 0, t, a = !e.startsWith("<!>");
  return () => {
    t === void 0 && (t = X(a ? e : "<!>" + e), t = /** @type {TemplateNode} */
    A(t));
    var l = (
      /** @type {TemplateNode} */
      i || D ? document.importNode(t, !0) : t.cloneNode(!0)
    );
    return Z(l, l), l;
  };
}
function k(e, r) {
  e !== null && e.before(
    /** @type {Node} */
    r
  );
}
const S = [...` 	
\r\f \v\uFEFF`];
function ee(e, r, i) {
  var t = "" + e;
  if (i) {
    for (var a of Object.keys(i))
      if (i[a])
        t = t ? t + " " + a : a;
      else if (t.length)
        for (var l = a.length, n = 0; (n = t.indexOf(a, n)) >= 0; ) {
          var u = n + l;
          (n === 0 || S.includes(t[n - 1])) && (u === t.length || S.includes(t[u])) ? t = (n === 0 ? "" : t.substring(0, n)) + t.substring(u + 1) : n = u;
        }
  }
  return t === "" ? null : t;
}
function te(e, r, i, t, a, l) {
  var n = e.__className;
  if (n !== i || n === void 0) {
    var u = ee(i, t, l);
    u == null ? e.removeAttribute("class") : e.className = u, e.__className = i;
  } else if (l && a !== l)
    for (var d in l) {
      var s = !!l[d];
      (a == null || s !== !!a[d]) && e.classList.toggle(d, s);
    }
  return l;
}
function b(e, r, i, t) {
  var a = !U || (i & Y) !== 0, l = (i & j) !== 0, n = (
    /** @type {V} */
    t
  ), u = !0, d = () => (u && (u = !1, n = /** @type {V} */
  t), n);
  let s;
  {
    var O = C in e || G in e;
    s = y(e, r)?.set ?? (O && r in e ? (f) => e[r] = f : void 0);
  }
  var v, T = !1;
  [v, T] = K(() => (
    /** @type {V} */
    e[r]
  )), v === void 0 && t !== void 0 && (v = d(), s && (a && M(), s(v)));
  var _;
  if (a ? _ = () => {
    var f = (
      /** @type {V} */
      e[r]
    );
    return f === void 0 ? d() : (u = !0, f);
  } : _ = () => {
    var f = (
      /** @type {V} */
      e[r]
    );
    return f !== void 0 && (n = /** @type {V} */
    void 0), f === void 0 ? n : f;
  }, a && (i & p) === 0)
    return _;
  if (s) {
    var L = e.$$legacy;
    return (
      /** @type {() => V} */
      (function(f, o) {
        return arguments.length > 0 ? ((!a || !o || L || T) && s(o ? _() : f), f) : _();
      })
    );
  }
  var m = !1, c = q(() => (m = !1, _()));
  h(c);
  var N = (
    /** @type {Effect} */
    E
  );
  return (
    /** @type {() => V} */
    (function(f, o) {
      if (arguments.length > 0) {
        const P = o ? h(c) : a && l ? I(f) : f;
        return B(c, P), m = !0, n !== void 0 && (n = P), f;
      }
      return x && m || (N.f & H) !== 0 ? c.v : h(c);
    })
  );
}
W();
var re = /* @__PURE__ */ $("<div> </div>");
function ae(e, r) {
  let i = b(r, "value", 8), t = b(r, "type", 8), a = b(r, "selected", 8, !1);
  var l = re();
  let n;
  var u = J(l);
  z(() => {
    n = te(l, 1, "svelte-s3apn9", null, n, {
      table: t() === "table",
      gallery: t() === "gallery",
      selected: a()
    }), F(u, i());
  }), k(e, l);
}
export {
  ae as default
};
