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