import{a as x}from"./chunk-B9ygI19o.js";import{_ as b,c as e,o as t,a as c,b as r,F as p,f as m,t as g,n as _}from"../entries/pages.x0_YHtxO.js";/* empty css              *//* empty css              */import"./chunk-ckwbz45p.js";const u={data(){return{activeTabId:"",tabs:[{id:"",name_en:"All",name_ar:"الكل"}],partners:[],loading:!1}},methods:{changeTab(s){this.activeTabId=s.id,this.loadPartners(s)},async loadPartners(s){var i,d;this.loading=!0;try{const n=await x.get(`https://admin.valueerp.net/api/partners?category_id=${s.id}`);this.tabs=[{id:"",name_en:"All",name_ar:"الكل"},...((d=(i=n.data)==null?void 0:i.data)==null?void 0:d.data)||[]],this.partners=n.data.data.partners}catch{}finally{this.loading=!1}}},async serverPrefetch(){await this.loadPartners(this.tabs[0])},created(){typeof window<"u"&&this.loadPartners(this.tabs[0])}},f={class:"mt-10 max-w-screen-2xl mx-auto xl:px-32 lg:px-16 md:px-12 sm:px-8 px-6"},y={key:0,class:"fixed inset-0 h-dvh flex items-center justify-center bg-white bg-opacity-90 z-50"},v={class:"tabs w-full overflow-x-auto border-b border-solid border-[#90A3BF]"},w={class:"flex justify-center md:gap-6 gap-2 min-w-fit"},k=["onClick"],P={key:1},A={class:"text-center mt-20 text-rainmaker"},C={key:2,class:"lg:mt-20 sm:mt-14 mt-8 grid lg:grid-cols-4 sm:grid-cols-3 grid-cols-2 gap-x-2 lg:gap-y-20 sm:gap-y-14 gap-y-8"},T=["src","alt"];function $(s,i,d,n,o,h){return t(),e("div",f,[c(" Loading "),o.loading?(t(),e("div",y,[...i[0]||(i[0]=[r("div",{class:"border-4 border-y-ambassador-blue border-x-inherit border-solid w-10 h-10 rounded-full animate-spin"},null,-1)])])):c("v-if",!0),r("div",v,[r("div",w,[(t(!0),e(p,null,m(o.tabs,(a,l)=>(t(),e("div",{key:l},[r("p",{onClick:B=>h.changeTab(a),class:_(`whitespace-nowrap pb-4 md:px-4 px-2 md:text-lg cursor-pointer ${o.activeTabId===a.id?"text-black border-b-4 border-solid border-[#F2994A]":"text-[#828282]"}`)},g(a[`name_${s.$i18n.locale}`]),11,k)]))),128))])]),o.partners.length===0?(t(),e("div",P,[r("p",A,g(s.$t("No data available")),1)])):(t(),e("div",C,[(t(!0),e(p,null,m(o.partners,(a,l)=>(t(),e("div",{key:l,class:"sm:p-5 p-3 text-center flex justify-center items-center",style:{"box-shadow":"0px 0px 21.79px 0px #0000000A"}},[r("img",{src:a.image,class:"m-auto",alt:`logo ${a.id}`},null,8,T)]))),128))]))])}const L=b(u,[["render",$]]);export{L as default};
