import { resolveComponent as c, openBlock as o, createElementBlock as a, normalizeStyle as b, unref as e, createElementVNode as l, createCommentVNode as n, toDisplayString as v, createVNode as w, createBlock as $, renderSlot as D, pushScopeId as E, popScopeId as j } from "vue";
import { useColor as S, usePost as z } from "./composables-5f691338.js";
import { _export_sfc as O } from "./_plugin-vue_export-helper-6a641814.js";
const T = (s) => (E("data-v-08d0832b"), s = s(), j(), s), U = {
  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",
  style: { flex: "14 1 620px" }
}, q = {
  key: 0,
  class: "p-0",
  style: { flex: "1 1 40px" }
}, A = ["src"], F = {
  class: "flex flex-col p-2 overflow-hidden",
  style: { flex: "10 1 280px" }
}, G = { class: "px-2" }, H = { class: "flex items-center" }, J = {
  key: 0,
  class: "text-xl font-bold my-2"
}, K = /* @__PURE__ */ T(() => /* @__PURE__ */ l("div", { class: "flex-1" }, null, -1)), L = {
  key: 0,
  class: "statement"
}, M = { class: "flex items-center flex-wrap items-center mt-2 gap-2" }, Q = {
  key: 0,
  class: "i-la-youtube mx-1"
}, R = {
  key: 1,
  class: "i-mdi-text-long mx-1"
}, W = {
  key: 1,
  class: "flex gap-1 rounded-xl p-1 bg-dark-50 bg-opacity-20 flex-wrap items-center",
  style: { flex: "1 1 130px" }
}, X = {
  __name: "PostCard",
  props: {
    hash: { type: String, default: "" },
    authors: { type: Object, default: () => ({}) },
    tag: { type: [String, Boolean], default: "" },
    back: Boolean,
    actions: { type: Boolean, default: !0 }
  },
  emits: ["user"],
  setup(s) {
    const C = s;
    S("light");
    const B = S("deep"), { post: t } = z({ hash: C.hash });
    return (d, r) => {
      var i, u, h, p, m, _, x, f, k, y, g;
      const I = c("post-link"), P = c("ui-link"), N = c("post-action-react");
      return o(), a("div", {
        class: "card",
        style: b({ backgroundImage: `url(${((i = e(t)) == null ? void 0 : i.cover) || ((u = e(t)) == null ? void 0 : u.raw)})`, backgroundColor: e(B).hex(s.hash) })
      }, [
        l("div", {
          class: "p-0",
          style: b([{ flex: "12 1 120px" }, { paddingTop: (h = e(t)) != null && h.cover || (p = e(t)) != null && p.raw ? "18em" : "0" }])
        }, null, 4),
        l("div", U, [
          (m = e(t)) != null && m.icon ? (o(), a("div", q, [
            l("img", {
              class: "w-20 max-h-20 rounded-full m-2",
              src: e(t).icon,
              width: "40px"
            }, null, 8, A)
          ])) : n("", !0),
          l("div", F, [
            l("div", G, [
              l("div", H, [
                (_ = e(t)) != null && _.title ? (o(), a("div", J, v(e(t).title), 1)) : n("", !0),
                K,
                w(I, { hash: s.hash }, null, 8, ["hash"])
              ]),
              (x = e(t)) != null && x.statement ? (o(), a("div", L, v(e(t).statement), 1)) : n("", !0)
            ]),
            l("div", M, [
              (f = e(t)) != null && f.youtube ? (o(), a("div", Q)) : n("", !0),
              (k = e(t)) != null && k.text ? (o(), a("div", R)) : n("", !0),
              (y = e(t)) != null && y.link ? (o(), $(P, {
                key: 2,
                url: (g = e(t)) == null ? void 0 : g.link
              }, null, 8, ["url"])) : n("", !0),
              D(d.$slots, "default", {}, void 0, !0)
            ])
          ]),
          s.actions ? (o(), a("div", W, [
            w(N, {
              authors: s.authors,
              hash: s.hash,
              tag: s.tag,
              back: s.back,
              onUser: r[0] || (r[0] = (V) => d.$emit("user", V))
            }, null, 8, ["authors", "hash", "tag", "back"])
          ])) : n("", !0)
        ])
      ], 4);
    };
  }
}, te = /* @__PURE__ */ O(X, [["__scopeId", "data-v-08d0832b"]]);
export {
  te as default
};
//# sourceMappingURL=PostCard-efee18a7.js.map
