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 N, createCommentVNode as c, createBaseVNode as t, normalizeStyle as g, toDisplayString as y, createBlock as P, renderSlot as V, createVNode as $, pushScopeId as U, popScopeId as z } from "./composables-Ci32s3jE.js";
import { UiLink as D } from "./components.js";
import { _export_sfc as E } from "./_plugin-vue_export-helper-DueaC3du.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: i } = C();
    return j("light"), j("deep"), (w, d) => {
      var n, a, u, m, p, x, f, h, b, v, k;
      const _ = S("account-badge");
      return o(), l("div", {
        class: "card",
        style: g({ 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(i).pub) || s(I).hosts[s(i).pub] ? (o(), l("div", {
          key: 0,
          class: "absolute top-2 right-2",
          onClick: d[0] || (d[0] = B((te) => s(N)(e.path), ["stop", "prevent"]))
        }, M)) : c("", !0),
        t("div", {
          class: "p-0",
          style: g([{ 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, [
                t("div", G, [
                  (x = e.project) != null && x.title ? (o(), l("div", H, y(e.project.title), 1)) : c("", !0),
                  (f = e.project) != null && f.description ? (o(), l("div", J, y(e.project.description), 1)) : c("", !0)
                ]),
                t("div", K, [
                  (h = e.project) != null && h.youtube ? (o(), l("div", Q)) : c("", !0),
                  (b = e.project) != null && b.text ? (o(), l("div", W)) : c("", !0),
                  (v = e.project) != null && v.link ? (o(), P(s(D), {
                    key: 2,
                    url: (k = e.project) == null ? void 0 : k.link
                  }, null, 8, ["url"])) : c("", !0),
                  X,
                  t("div", Y, [
                    V(w.$slots, "default", {}, void 0, !0)
                  ])
                ]),
                Z,
                $(_, {
                  pub: e.path.slice(-87)
                }, null, 8, ["pub"])
              ])
            ])
          ])
        ])
      ], 4);
    };
  }
}, se = /* @__PURE__ */ E(ee, [["__scopeId", "data-v-b7c2bbeb"]]);
export {
  se as default
};
//# sourceMappingURL=ProjectCard-B5du8U9B.js.map
