import { useUser as w, useColor as y, openBlock as o, createElementBlock as l, unref as c, currentRoom as C, withModifiers as S, removeProject as I, createCommentVNode as s, createBaseVNode as t, normalizeStyle as b, toDisplayString as g, createBlock as B, renderSlot as P, pushScopeId as $, popScopeId as N } from "./composables-108ad332.js";
import { UiLink as U } from "./components.js";
import { _export_sfc as V } from "./_plugin-vue_export-helper-6a641814.js";
const r = (e) => ($("data-v-c523055f"), e = e(), N(), e), z = /* @__PURE__ */ r(() => /* @__PURE__ */ t("div", { class: "i-la-trash" }, null, -1)), D = [
  z
], E = { class: "flex flex-wrap items-center max-w-full w-full backdrop-blur-lg rounded-2xl bg-light-100 dark-bg-dark-400 backdrop-blur-sm backdrop-filter shadow-md" }, L = {
  key: 0,
  class: "p-0",
  style: { flex: "1 1 40px" }
}, M = ["src"], O = {
  class: "flex flex-col p-2 overflow-hidden",
  style: { flex: "10 1 280px" }
}, R = { class: "px-2" }, T = { class: "flex items-center" }, q = {
  key: 0,
  class: "text-xl font-bold my-2"
}, A = { class: "flex items-center flex-wrap items-center mt-2 gap-2" }, F = {
  key: 0,
  class: "i-la-youtube mx-1"
}, G = {
  key: 1,
  class: "i-mdi-text-long mx-1"
}, H = /* @__PURE__ */ r(() => /* @__PURE__ */ t("div", { class: "flex-1" }, null, -1)), J = { class: "text-xs break-all p-2" }, K = /* @__PURE__ */ r(() => /* @__PURE__ */ t("div", { class: "flex-1" }, null, -1)), Q = {
  key: 0,
  class: "statement"
}, W = {
  __name: "ProjectCard",
  props: {
    path: { type: String, default: "" },
    project: {
      type: Object,
      default: () => ({
        title: "",
        statement: "",
        color: "",
        cover: null,
        icon: null,
        link: "",
        goals: [],
        objects: [],
        events: [],
        text: ""
      })
    }
  },
  emits: ["user"],
  setup(e) {
    const { user: d } = w();
    return y("light"), y("deep"), (_, i) => {
      var n, a, u, m, f, x, p, h, v, k, j;
      return o(), l("div", {
        class: "card",
        style: b({ backgroundImage: `url(${((n = e.project) == null ? void 0 : n.cover) || ((a = e.project) == null ? void 0 : a.raw) || "none"})`, backgroundColor: e.project.color })
      }, [
        e.path.includes(c(d).pub) || c(C).hosts[c(d).pub] ? (o(), l("div", {
          key: 0,
          class: "absolute top-2 right-2",
          onClick: i[0] || (i[0] = S((X) => c(I)(e.path), ["stop", "prevent"]))
        }, D)) : s("", !0),
        t("div", {
          class: "p-0",
          style: b([{ flex: "12 1 120px" }, { paddingTop: (u = e.project) != null && u.cover || (m = e.project) != null && m.raw ? "18em" : "0" }])
        }, null, 4),
        t("div", E, [
          (f = e.project) != null && f.icon ? (o(), l("div", L, [
            t("img", {
              class: "w-20 max-h-20 rounded-full m-2",
              src: e.project.icon,
              width: "40px"
            }, null, 8, M)
          ])) : s("", !0),
          t("div", O, [
            t("div", R, [
              t("div", T, [
                (x = e.project) != null && x.title ? (o(), l("div", q, g(e.project.title), 1)) : s("", !0),
                t("div", A, [
                  (p = e.project) != null && p.youtube ? (o(), l("div", F)) : s("", !0),
                  (h = e.project) != null && h.text ? (o(), l("div", G)) : s("", !0),
                  (v = e.project) != null && v.link ? (o(), B(c(U), {
                    key: 2,
                    url: (k = e.project) == null ? void 0 : k.link
                  }, null, 8, ["url"])) : s("", !0),
                  H,
                  t("div", J, [
                    P(_.$slots, "default", {}, void 0, !0)
                  ])
                ]),
                K
              ]),
              (j = e.project) != null && j.statement ? (o(), l("div", Q, g(e.project.statement), 1)) : s("", !0)
            ])
          ])
        ])
      ], 4);
    };
  }
}, te = /* @__PURE__ */ V(W, [["__scopeId", "data-v-c523055f"]]);
export {
  te as default
};
//# sourceMappingURL=ProjectCard-ed555788.js.map
