import { useUser as C, useColor as j, resolveComponent as S, openBlock as o, createElementBlock as l, unref as s, currentRoom as I, withModifiers as B, removeProject as P, createCommentVNode as c, createBaseVNode as t, normalizeStyle as y, toDisplayString as g, createBlock as N, renderSlot as V, createVNode as $, pushScopeId as U, popScopeId as z } from "./composables-61bf5e40.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-a87fdeb3"), 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 = {
  key: 0,
  class: "text-xl font-bold my-2"
}, H = { class: "flex items-center flex-wrap items-center mt-2 gap-2" }, J = {
  key: 0,
  class: "i-la-youtube mx-1"
}, K = {
  key: 1,
  class: "i-mdi-text-long mx-1"
}, Q = /* @__PURE__ */ r(() => /* @__PURE__ */ t("div", { class: "flex-1" }, null, -1)), W = { class: "text-xs break-all p-2" }, X = /* @__PURE__ */ r(() => /* @__PURE__ */ t("div", { class: "flex-1" }, null, -1)), Y = {
  key: 0,
  class: "statement"
}, Z = {
  __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"), (_, n) => {
      var a, i, u, m, p, f, x, h, v, b, k;
      const w = S("account-badge");
      return o(), l("div", {
        class: "card",
        style: y({ backgroundImage: `url(${((a = e.project) == null ? void 0 : a.cover) || ((i = e.project) == null ? void 0 : i.raw) || "none"})`, backgroundColor: e.project.color })
      }, [
        e.path.includes(s(d).pub) || s(I).hosts[s(d).pub] ? (o(), l("div", {
          key: 0,
          class: "absolute top-2 right-2",
          onClick: n[0] || (n[0] = B((ee) => s(P)(e.path), ["stop", "prevent"]))
        }, M)) : c("", !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)
          ])) : c("", !0),
          t("div", q, [
            t("div", A, [
              t("div", F, [
                (f = e.project) != null && f.title ? (o(), l("div", G, g(e.project.title), 1)) : c("", !0),
                t("div", H, [
                  (x = e.project) != null && x.youtube ? (o(), l("div", J)) : c("", !0),
                  (h = e.project) != null && h.text ? (o(), l("div", K)) : c("", !0),
                  (v = e.project) != null && v.link ? (o(), N(s(D), {
                    key: 2,
                    url: (b = e.project) == null ? void 0 : b.link
                  }, null, 8, ["url"])) : c("", !0),
                  Q,
                  t("div", W, [
                    V(_.$slots, "default", {}, void 0, !0)
                  ])
                ]),
                X,
                $(w, {
                  pub: e.path.slice(-87)
                }, null, 8, ["pub"])
              ]),
              (k = e.project) != null && k.statement ? (o(), l("div", Y, g(e.project.statement), 1)) : c("", !0)
            ])
          ])
        ])
      ], 4);
    };
  }
}, ce = /* @__PURE__ */ E(Z, [["__scopeId", "data-v-a87fdeb3"]]);
export {
  ce as default
};
//# sourceMappingURL=ProjectCard-a559fc2e.js.map
