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