import { u } from './Skeleton-DfjdyTna.mjs';
import { mergeProps, unref, withCtx, createVNode, toDisplayString, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderList, ssrRenderComponent, ssrInterpolate, ssrRenderAttr, ssrRenderClass } from 'vue/server-renderer';
import { f as cf, u as Qt, d as gs, a as Ts, _ as Ds } from './server.mjs';
import { g } from './SvgIcon-C2791tkm.mjs';
import { a } from './NoData-S35t_fLa.mjs';
import '../_/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:fs';
import 'node:url';
import 'node:path';
import 'unhead';
import '@unhead/shared';
import 'vue-router';
import 'vue-rate';
import 'date-fns';
import '@hennge/vue3-pagination';
import 'axios';
import 'vue-social-sharing';

const _ = {};
const $ = _.setup;
_.setup = (e2, s2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("components/Shared/BrandsSkelton.vue"), $ ? $(e2, s2) : undefined;
};
const k = cf(_, [["ssrRender", function(t2, a2, r2, i2) {
  const o2 = u;
  a2(`<div${ssrRenderAttrs(mergeProps({ class: "grid grid-cols-1 md:grid-cols-2 gap-8" }, i2))}><!--[-->`), ssrRenderList(6, (e2) => {
    a2('<div class="flex bg-white p-4 items-center gap-4">'), a2(ssrRenderComponent(o2, { class: "h-[80px] w-[80px]" }, null, r2)), a2(ssrRenderComponent(o2, { class: "h-[24px] w-[150px]" }, null, r2)), a2("</div>");
  }), a2("<!--]--></div>");
}]]), w = { __name: "all-brands", __ssrInlineRender: true, setup(e2) {
  const t2 = Qt().$axios, { locale: u2 } = gs(), { data: _2, status: $2, refresh: w2 } = Ts("brands", () => t2("brands").then((e3) => e3.data.data).catch((e3) => e3.response.data));
  return (e3, t3, h2, v2) => {
    var g2;
    const w3 = k, j2 = Ds, S = g, z = a;
    t3(`<div${ssrRenderAttrs(mergeProps({ class: "bg-[#F6F7FC] p-4 lg:p-6 h-fit" }, v2))}><h3 class="font-bold text-xl lg:mb-10 mb-6">${ssrInterpolate(e3.$t("TITLES.allBrands"))}</h3>`), "pending" === unref($2) ? (t3("<div>"), t3(ssrRenderComponent(w3, null, null, h2)), t3("</div>")) : "success" == unref($2) ? (t3("<div>"), (null == (g2 = unref(_2)) ? undefined : g2.length) ? (t3('<div class="grid grid-cols-1 md:grid-cols-2 gap-4 lg:gap-8"><!--[-->'), ssrRenderList(unref(_2), (s2) => {
      t3(ssrRenderComponent(j2, { key: s2.id, to: e3.localePath(`/categories?brand=${s2.id}`), class: "flex bg-white p-4 items-center gap-4" }, { default: withCtx((e4, t4, r2, l2) => {
        if (!t4) return [createVNode("img", { src: s2.image.media, width: "80", height: "80", alt: "zara", class: "size-20 object-cover rounded" }, null, 8, ["src"]), createVNode("h5", { class: "font-medium text-xl" }, toDisplayString(s2.title), 1), createVNode("div", { class: ["flex-shrink-0 ms-auto inline-block", "ar" === unref(u2) ? "rotate-180" : ""] }, [createVNode(S, { class: ["ar" === unref(u2) ? "rotate-180" : "", "[&_path]:fill-primary [&_path]:scale-75"], name: "chevron-right" }, null, 8, ["class"])], 2)];
        t4(`<img${ssrRenderAttr("src", s2.image.media)} width="80" height="80" alt="zara" class="size-20 object-cover rounded"${l2}><h5 class="font-medium text-xl"${l2}>${ssrInterpolate(s2.title)}</h5><div class="${ssrRenderClass(["ar" === unref(u2) ? "rotate-180" : "", "flex-shrink-0 ms-auto inline-block"])}"${l2}>`), t4(ssrRenderComponent(S, { class: ["ar" === unref(u2) ? "rotate-180" : "", "[&_path]:fill-primary [&_path]:scale-75"], name: "chevron-right" }, null, r2, l2)), t4("</div>");
      }), _: 2 }, h2));
    }), t3("<!--]--></div>")) : (t3("<div>"), t3(ssrRenderComponent(z, { class: "!min-h-[320px]" }, null, h2)), t3("</div>")), t3("</div>")) : t3("<!---->"), t3("</div>");
  };
} }, j = w.setup;
w.setup = (e2, s2) => {
  const a2 = useSSRContext();
  return (a2.modules || (a2.modules = /* @__PURE__ */ new Set())).add("pages/profile/all-brands.vue"), j ? j(e2, s2) : undefined;
};

export { w as default };
//# sourceMappingURL=all-brands-Bepj4rYm.mjs.map
