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