import{a as x}from"./chunk-B9ygI19o.js";import{_ as u,r as g,c as o,o as r,a,b as e,t as n,k as b,v as h,m as v,F as f,f as _,d as w,w as $,n as p,e as y}from"../entries/pages.x0_YHtxO.js";/* empty css              *//* empty css              *//* empty css              */import"./chunk-ckwbz45p.js";const k={data(){return{allUpdates:{},updates:[],allData:[],loading:!1,search:""}},methods:{updateHref(l){return l?`/${this.$i18n.locale}/blogs/${l[`slug_${this.$i18n.locale}`]}`:"#"},async loadUdates(l){this.loading=!0;try{const t=await x.get(`https://admin.valueerp.net/api/updates?page=${l}&q=${this.search}`);this.allUpdates=t.data.data.all_updates,this.allData=[...this.allData,...this.allUpdates.data].flat(),this.updates=t.data.data.data}catch{}finally{this.loading=!1}}},async serverPrefetch(){await this.loadUdates(1)},created(){typeof window<"u"&&this.loadUdates(1)}},D={key:0,class:"fixed inset-0 h-dvh flex items-center justify-center bg-white bg-opacity-90 z-50"},F={class:"-mt-24 bg-no-repeat bg-cover updates-cover pt-40 pb-8"},U={class:"max-w-screen-2xl mx-auto xl:px-20 lg:px-16 md:px-12 sm:px-8 px-6"},C={class:"lg:text-7xl md:text-6xl sm:text-5xl text-3xl sm:ltr:text-left sm:rtl:text-right text-center font-bold text-white xl:leading-[115px] sm:leading-tight leading-normal"},L={class:"xl:w-1/4 sm:w-1/2 w-full xl:mt-8 mt-12 border border-solid md:p-3 p-2 rounded-full text-white flex items-center gap-3 bg-[#FFFFFF26]",style:{"backdrop-filter":"blur(8px)"}},T=["placeholder"],j={class:"mt-10 flex items-center gap-2 text-white justify-end"},M={class:"md:text-lg"},B={key:1,class:"md:mt-28 mt-20 max-w-screen-2xl mx-auto xl:px-20 lg:px-16 md:px-12 sm:px-8 px-6"},V={class:"grid xl:grid-cols-3 lg:grid-cols-2 grid-cols-1 gap-6"},E=["src","alt"],H={class:"text-center"},N={class:"block text-xl font-bold text-[#343434]"},S={class:"block text-[#737373]"},P={class:"sm:w-[90%] w-[95%] -mt-14 relative sm:p-6 p-4 bg-white mx-auto rounded-2xl border-b-[3px] border-solid border-transparent group-hover:border-ambassador-blue transition-colors duration-500 shadow-[0px_5px_60px_0px_#0000000d]"},z={class:"sm:mb-4 mb-2 leading-6 font-medium md:text-xl text-lg text-ambassador-blue"},G=["innerHTML"],K={class:"sm:mt-2 mt-1 text-sm flex items-center group-hover:text-blue-600 transition-colors duration-500"},R={class:"material-symbols-rounded text-base h-5"};function q(l,t,A,I,i,d){const c=g("router-link");return r(),o("div",null,[a(" Loading "),i.loading?(r(),o("div",D,[...t[4]||(t[4]=[e("div",{class:"border-4 border-y-ambassador-blue border-x-inherit border-solid w-10 h-10 rounded-full animate-spin"},null,-1)])])):a("v-if",!0),e("div",F,[e("div",U,[e("h1",C,n(l.$t("Improve Decision Making with Enterprise Resource Planning")),1),e("div",L,[e("button",{onClick:t[0]||(t[0]=s=>d.loadUdates(1)),class:"bg-[#E58411] rounded-full w-8 h-8 flex items-center justify-center shrink-0"},[...t[5]||(t[5]=[e("span",{class:"material-symbols-rounded text-xl"},"search",-1)])]),b(e("input",{type:"text",name:"search",id:"search","onUpdate:modelValue":t[1]||(t[1]=s=>i.search=s),onKeyup:t[2]||(t[2]=v(s=>d.loadUdates(1),["enter"])),placeholder:l.$t("Search for articles"),class:"w-full bg-transparent outline-none"},null,40,T),[[h,i.search]])]),e("div",j,[e("p",M,n(l.$t("Explore More")),1),t[6]||(t[6]=e("span",{class:"material-symbols-rounded"},"south",-1))])])]),a(` <div class="md:mt-28 mt-20 max-w-screen-2xl mx-auto xl:px-20 lg:px-16 md:px-12 sm:px-8 px-6">
      <div class="grid lg:grid-cols-2 grid-cols-1 gap-5">
        <div v-if="updates.length > 0" @click="goToupdateDetails(updates[0])" class="cursor-pointer">
          <img :src="updates[0].image" class="w-full h-[380px] object-cover" :alt="updates[0][\`title_\${$i18n.locale}\`]">
          <div class="xl:mt-5 mt-4">
            <p class="text-rainmaker text-sm font-light">{{ updates[0].created }}</p>
            <p class="lg:my-4 my-2 font-medium lg:text-xl text-lg">{{ updates[0][\`title_\${$i18n.locale}\`] }}</p>
            <p class="lg:text-base text-sm text-rainmaker ellipsis-4" v-html="updates[0][\`content_\${$i18n.locale}\`] ? updates[0][\`content_\${$i18n.locale}\`].replace(/\\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;').replace(/\\r?\\n/g, '<br>') : ''"></p>
          </div>
        </div>
        <div v-if="updates.slice(1).length > 0">
          <div v-for="(item, index) in updates.slice(1)" :key="index" class="flex flex-col lg:gap-5 gap-4">
            <div @click="goToupdateDetails(item)" class="cursor-pointer flex sm:items-start items-center xl:gap-6 gap-4">
              <div class="xl:w-1/3 lg:h-full sm:w-auto w-1/3">
                <img :src="item.image" class="w-full" :alt="item[\`title_\${$i18n.locale}\`]">
              </div>
              <div class="lg:w-2/3 sm:w-auto w-2/3 flex flex-col xl:gap-3 gap-2 lg:justify-between">
                <p class="text-rainmaker sm:text-sm text-xs font-light">{{ item.created }}</p>
                <p class="font-medium xl:text-lg md:text-base sm:text-sm text-xs overflow-hidden text-ellipsis" v-html="item[\`content_\${$i18n.locale}\`] ? item[\`content_\${$i18n.locale}\`].replace(/\\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;').replace(/\\r?\\n/g, '<br>') : ''" style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;"></p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div> `),i.allData.length>0?(r(),o("div",B,[e("div",V,[(r(!0),o(f,null,_(i.allData,(s,m)=>(r(),o("div",{key:m},[w(c,{to:d.updateHref(s),class:"relative group block"},{default:$(()=>[e("div",{class:p(`rounded-2xl border border-solid border-[#F1F3F7] overflow-hidden h-[260px] ${l.$i18n.locale==="en"?"rounded-tr-md":"rounded-tl-md"}`)},[e("img",{src:s.image,class:"object-cover w-full h-full",alt:s[`title_${l.$i18n.locale}`]},null,8,E)],2),a(" Date "),e("div",{class:p(`absolute top-0 end-0 bg-[#F1F3F7] py-2 px-3 ${l.$i18n.locale==="en"?"rounded-tr-md rounded-bl-md":"rounded-tl-md rounded-br-md"}`)},[e("p",H,[e("span",N,n(new Date(s.created).toLocaleDateString("en-GB",{day:"2-digit"})),1),e("span",S,n(new Date(s.created).toLocaleDateString("en-GB",{month:"short"})),1)])],2),a(" Card "),e("div",P,[e("p",z,n(s[`title_${l.$i18n.locale}`]),1),e("p",{class:"md:text-base text-sm text-rainmaker ellipsis-5",innerHTML:s[`content_${l.$i18n.locale}`]?s[`content_${l.$i18n.locale}`].replace(/\t/g,"    ").replace(/\r?\n/g,"<br>"):""},null,8,G),e("span",K,[y(n(l.$t("Read more"))+" ",1),e("span",R,n(l.$i18n.locale==="en"?"arrow_right_alt":"arrow_left_alt"),1)])])]),_:2},1032,["to"])]))),128))]),a(` <div class="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 lg:gap-6 gap-4">
        <div v-for="(item, index) in allData" :key="index" class="border border-solid border-[#F1F3F7] rounded-lg" style="box-shadow: 0px 1px 4px 0px #19213D14;">
          <div @click="goToupdateDetails(item)" class="cursor-pointer">
            <img :src="item.image" class="rounded-tl-lg rounded-tr-lg w-full md:h-[270px] h-[200px] bg-cover" :alt="item[\`title_\${$i18n.locale}\`]">
            <div class="xl:p-6 p-4">
              <p class="text-liberty-blue font-medium lg:text-xl text-lg">{{ item[\`title_\${$i18n.locale}\`] }}</p>
              <p class="md:mb-4 mb-2 md:mt-2 text-rainmaker text-sm font-light">{{ item.created }}</p>
              <p class="lg:text-base text-sm text-rainmaker ellipsis-5" v-html="item[\`content_\${$i18n.locale}\`] ? item[\`content_\${$i18n.locale}\`].replace(/\\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;').replace(/\\r?\\n/g, '<br>') : ''"></p>
            </div>
          </div>
        </div>
      </div> `),i.allUpdates.next_page_url?(r(),o("button",{key:0,onClick:t[3]||(t[3]=s=>d.loadUdates(i.allUpdates.current_page+1)),class:"flex items-center gap-2 m-auto mt-6"},[e("span",null,n(l.$t("Load More")),1),t[7]||(t[7]=e("span",{class:"material-symbols-rounded text-xl"},"south",-1))])):a("v-if",!0)])):a("v-if",!0)])}const Z=u(k,[["render",q]]);export{Z as default};
