import{a as A}from"./chunk-B9ygI19o.js";import{p as X,q as M,s as O,x as R,y as ne,z as B,A as Y,B as W,c as f,o as u,b as r,C as le,D as de,E as ce,G as pe,H as T,_ as P,r as q,g as ee,w as ue,d as N,a as x,t as c,F as U,f as V,n as z,k as w,v as E,I as F}from"../entries/pages.x0_YHtxO.js";/* empty css              *//* empty css              *//* empty css              */import"./chunk-ckwbz45p.js";(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".mapdiv[data-v-d05fc6bc]{width:100%;height:100%}.custom-control-wrapper[data-v-d099a3a6]{display:none}.mapdiv .custom-control-wrapper[data-v-d099a3a6]{display:inline-block}.info-window-wrapper[data-v-cbe1707b]{display:none}.mapdiv .info-window-wrapper[data-v-cbe1707b]{display:inline-block}.custom-marker-wrapper[data-v-2d2d343a]{display:none}.mapdiv .custom-marker-wrapper[data-v-2d2d343a]{display:inline-block}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var me=Object.defineProperty,he=(t,e,o)=>e in t?me(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Z=(t,e,o)=>(he(t,typeof e!="symbol"?e+"":e,o),o);const te=Symbol("map"),se=Symbol("api"),fe=Symbol("marker"),ge=Symbol("markerCluster"),oe=Symbol("CustomMarker"),be=Symbol("mapTilesLoaded"),re=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function ve(t,e,o,i){function s(n){return n instanceof o?n:new o(function(a){a(n)})}return new(o||(o=Promise))(function(n,a){function l(m){try{y(i.next(m))}catch(p){a(p)}}function h(m){try{y(i.throw(m))}catch(p){a(p)}}function y(m){m.done?n(m.value):s(m.value).then(l,h)}y((i=i.apply(t,[])).next())})}var ye=function t(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var i,s,n;if(Array.isArray(e)){if(i=e.length,i!=o.length)return!1;for(s=i;s--!==0;)if(!t(e[s],o[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===o.toString();if(n=Object.keys(e),i=n.length,i!==Object.keys(o).length)return!1;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(o,n[s]))return!1;for(s=i;s--!==0;){var a=n[s];if(!t(e[a],o[a]))return!1}return!0}return e!==e&&o!==o};const K="__googleMapsScriptId";var $;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})($||($={}));class I{constructor({apiKey:e,authReferrerPolicy:o,channel:i,client:s,id:n=K,language:a,libraries:l=[],mapIds:h,nonce:y,region:m,retries:p=3,url:g="https://maps.googleapis.com/maps/api/js",version:v}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=o,this.channel=i,this.client=s,this.id=n||K,this.language=a,this.libraries=l,this.mapIds=h,this.nonce=y,this.region=m,this.retries=p,this.url=g,this.version=v,I.instance){if(!ye(this.options,I.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(I.instance.options)}`);return I.instance}I.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?$.FAILURE:this.done?$.SUCCESS:this.loading?$.LOADING:$.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`&region=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,o)=>{this.loadCallback(i=>{i?o(i.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,o;if(document.getElementById(this.id)){this.callback();return}const i={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(i).forEach(n=>!i[n]&&delete i[n]),!((o=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||o===void 0)&&o.importLibrary||(n=>{let a,l,h,y="The Google Maps JavaScript API",m="google",p="importLibrary",g="__ib__",v=document,d=window;d=d[m]||(d[m]={});const b=d.maps||(d.maps={}),_=new Set,k=new URLSearchParams,S=()=>a||(a=new Promise((C,j)=>ve(this,void 0,void 0,function*(){var L;yield l=v.createElement("script"),l.id=this.id,k.set("libraries",[..._]+"");for(h in n)k.set(h.replace(/[A-Z]/g,D=>"_"+D[0].toLowerCase()),n[h]);k.set("callback",m+".maps."+g),l.src=this.url+"?"+k,b[g]=C,l.onerror=()=>a=j(Error(y+" could not load.")),l.nonce=this.nonce||((L=v.querySelector("script[nonce]"))===null||L===void 0?void 0:L.nonce)||"",v.head.append(l)})));b[p]?console.warn(y+" only loads once. Ignoring:",n):b[p]=(C,...j)=>_.add(C)&&S().then(()=>b[p](C,...j))})(i);const s=this.libraries.map(n=>this.importLibrary(n));s.length||s.push(this.importLibrary("core")),Promise.all(s).then(()=>this.callback(),n=>{const a=new ErrorEvent("error",{error:n});this.loadErrorCallback(a)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const o=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${o} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},o)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setScript())}}}function _e(t){return class extends t.OverlayView{constructor(e){super(),Z(this,"element"),Z(this,"opts");const{element:o,...i}=e;this.element=o,this.opts=i,this.opts.map&&this.setMap(this.opts.map)}getPosition(){return this.opts.position?this.opts.position instanceof t.LatLng?this.opts.position:new t.LatLng(this.opts.position):null}getVisible(){if(!this.element)return!1;const e=this.element;return e.style.display!=="none"&&e.style.visibility!=="hidden"&&(e.style.opacity===""||Number(e.style.opacity)>.01)}onAdd(){if(!this.element)return;const e=this.getPanes();e&&e.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const e=this.getProjection(),o=e==null?void 0:e.fromLatLngToDivPixel(this.getPosition());if(o){this.element.style.position="absolute";let i,s;switch(this.opts.anchorPoint){case"TOP_CENTER":i="-50%",s="-100%";break;case"BOTTOM_CENTER":i="-50%",s="0";break;case"LEFT_CENTER":i="-100%",s="-50%";break;case"RIGHT_CENTER":i="0",s="-50%";break;case"TOP_LEFT":i="-100%",s="-100%";break;case"TOP_RIGHT":i="0",s="-100%";break;case"BOTTOM_LEFT":i="-100%",s="0";break;case"BOTTOM_RIGHT":i="0",s="0";break;default:i="-50%",s="-50%"}const n=o.x+(this.opts.offsetX||0)+"px",a=o.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${i}) translateX(${n}) translateY(${s}) translateY(${a})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(e){const{element:o,...i}=e;this.element=o,this.opts=i,this.draw()}}}let H;const J=["bounds_changed","center_changed","click","contextmenu","dblclick","drag","dragend","dragstart","heading_changed","idle","isfractionalzoomenabled_changed","mapcapabilities_changed","maptypeid_changed","mousemove","mouseout","mouseover","projection_changed","renderingtype_changed","rightclick","tilesloaded","tilt_changed","zoom_changed"],xe=X({props:{apiPromise:{type:Promise},apiKey:{type:String,default:""},version:{type:String,default:"weekly"},libraries:{type:Array,default:()=>["places","marker"]},region:{type:String,required:!1},language:{type:String,required:!1},backgroundColor:{type:String,required:!1},center:{type:Object,default:()=>({lat:0,lng:0})},clickableIcons:{type:Boolean,required:!1,default:void 0},controlSize:{type:Number,required:!1},disableDefaultUi:{type:Boolean,required:!1,default:void 0},disableDoubleClickZoom:{type:Boolean,required:!1,default:void 0},draggable:{type:Boolean,required:!1,default:void 0},draggableCursor:{type:String,required:!1},draggingCursor:{type:String,required:!1},fullscreenControl:{type:Boolean,required:!1,default:void 0},fullscreenControlPosition:{type:String,required:!1},gestureHandling:{type:String,required:!1},heading:{type:Number,required:!1},isFractionalZoomEnabled:{type:Boolean,required:!1,default:void 0},keyboardShortcuts:{type:Boolean,required:!1,default:void 0},mapTypeControl:{type:Boolean,required:!1,default:void 0},mapTypeControlOptions:{type:Object,required:!1},mapTypeId:{type:[Number,String],required:!1},mapId:{type:String,required:!1},maxZoom:{type:Number,required:!1},minZoom:{type:Number,required:!1},noClear:{type:Boolean,required:!1,default:void 0},panControl:{type:Boolean,required:!1,default:void 0},panControlPosition:{type:String,required:!1},restriction:{type:Object,required:!1},rotateControl:{type:Boolean,required:!1,default:void 0},rotateControlPosition:{type:String,required:!1},scaleControl:{type:Boolean,required:!1,default:void 0},scaleControlStyle:{type:Number,required:!1},scrollwheel:{type:Boolean,required:!1,default:void 0},streetView:{type:Object,required:!1},streetViewControl:{type:Boolean,required:!1,default:void 0},streetViewControlPosition:{type:String,required:!1},styles:{type:Array,required:!1},tilt:{type:Number,required:!1},zoom:{type:Number,required:!1},zoomControl:{type:Boolean,required:!1,default:void 0},zoomControlPosition:{type:String,required:!1},nonce:{type:String,default:""}},emits:J,setup(t,{emit:e}){const o=O(),i=O(!1),s=O(),n=O(),a=O(!1);T(te,s),T(se,n),T(be,a);const l=()=>{const p={...t};Object.keys(p).forEach(d=>{p[d]===void 0&&delete p[d]});const g=d=>{var b;return d?{position:(b=n.value)==null?void 0:b.ControlPosition[d]}:{}},v={scaleControlOptions:t.scaleControlStyle?{style:t.scaleControlStyle}:{},panControlOptions:g(t.panControlPosition),zoomControlOptions:g(t.zoomControlPosition),rotateControlOptions:g(t.rotateControlPosition),streetViewControlOptions:g(t.streetViewControlPosition),fullscreenControlOptions:g(t.fullscreenControlPosition),disableDefaultUI:t.disableDefaultUi};return{...p,...v}},h=R([n,s],([p,g])=>{const v=p,d=g;v&&d&&(v.event.addListenerOnce(d,"tilesloaded",()=>{a.value=!0}),setTimeout(h,0))},{immediate:!0}),y=()=>{try{const{apiKey:p,region:g,version:v,language:d,libraries:b,nonce:_}=t;H=new I({apiKey:p,region:g,version:v,language:d,libraries:b,nonce:_})}catch(p){console.error(p)}},m=p=>{n.value=B(p.maps),s.value=B(new p.maps.Map(o.value,l()));const g=_e(n.value);n.value[oe]=g,J.forEach(d=>{var b;(b=s.value)==null||b.addListener(d,_=>e(d,_))}),i.value=!0;const v=Object.keys(t).filter(d=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom","nonce"].includes(d)).map(d=>W(t,d));R([()=>t.center,()=>t.zoom,...v],([d,b],[_,k])=>{var S,C,j;const{center:L,zoom:D,...ae}=l();(S=s.value)==null||S.setOptions(ae),b!==void 0&&b!==k&&((C=s.value)==null||C.setZoom(b));const ie=!_||d.lng!==_.lng||d.lat!==_.lat;d&&ie&&((j=s.value)==null||j.panTo(d))})};return pe(()=>{t.apiPromise&&t.apiPromise instanceof Promise?t.apiPromise.then(m):(y(),H.load().then(m))}),Y(()=>{var p;a.value=!1,s.value&&((p=n.value)==null||p.event.clearInstanceListeners(s.value))}),{mapRef:o,ready:i,map:s,api:n,mapTilesLoaded:a}}}),ke=(t,e)=>{const o=t.__vccOpts||t;for(const[i,s]of e)o[i]=s;return o},we={ref:"mapRef",class:"mapdiv"};function Oe(t,e,o,i,s,n){return u(),f("div",null,[r("div",we,null,512),le(t.$slots,"default",de(ce({ready:t.ready,map:t.map,api:t.api,mapTilesLoaded:t.mapTilesLoaded})),void 0)])}const Ce=ke(xe,[["render",Oe],["__scopeId","data-v-d05fc6bc"]]);function Ie(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Se=function t(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var i,s,n;if(Array.isArray(e)){if(i=e.length,i!=o.length)return!1;for(s=i;s--!==0;)if(!t(e[s],o[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===o.toString();if(n=Object.keys(e),i=n.length,i!==Object.keys(o).length)return!1;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(o,n[s]))return!1;for(s=i;s--!==0;){var a=n[s];if(!t(e[a],o[a]))return!1}return!0}return e!==e&&o!==o};const je=Ie(Se),$e=(t,e,o,i)=>{const s=O(),n=M(te,O()),a=M(se,O()),l=M(ge,O()),h=ne(()=>!!(l.value&&a.value&&(s.value instanceof a.value.Marker||s.value instanceof a.value[oe])));return R([n,o],(y,[m,p])=>{var g,v,d;const b=!je(o.value,p)||n.value!==m;!n.value||!a.value||!b||(s.value?(s.value.setOptions(o.value),h.value&&((g=l.value)==null||g.removeMarker(s.value),(v=l.value)==null||v.addMarker(s.value))):(s.value=B(new a.value[t](o.value)),h.value?(d=l.value)==null||d.addMarker(s.value):s.value.setMap(n.value),e.forEach(_=>{var k;(k=s.value)==null||k.addListener(_,S=>i(_,S))})))},{immediate:!0}),Y(()=>{var y,m;s.value&&((y=a.value)==null||y.event.clearInstanceListeners(s.value),h.value?(m=l.value)==null||m.removeMarker(s.value):s.value.setMap(null))}),s},Q=["animation_changed","click","dblclick","rightclick","dragstart","dragend","drag","mouseover","mousedown","mouseout","mouseup","draggable_changed","clickable_changed","contextmenu","cursor_changed","flat_changed","rightclick","zindex_changed","icon_changed","position_changed","shape_changed","title_changed","visible_changed"],qe=X({name:"Marker",props:{options:{type:Object,required:!0}},emits:Q,setup(t,{emit:e,expose:o,slots:i}){const s=W(t,"options"),n=$e("Marker",Q,s,e);return T(fe,n),o({marker:n}),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}});re.concat(["bounds_changed"]);re.concat(["center_changed","radius_changed"]);var G;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(G||(G={}));Object.values(G);const Ee={props:["center"],data(){return{}},components:{GoogleMap:Ce,GoogleMarker:qe}};function Pe(t,e,o,i,s,n){const a=q("GoogleMarker"),l=q("GoogleMap",!0);return u(),ee(l,{"api-key":"",center:o.center,zoom:7,style:{width:"100%",height:"100%"}},{default:ue(()=>[N(a,{options:{position:o.center}},null,8,["options"]),x(` <MarkerCluster>
      <GoogleMarker
        v-for="(location, i) in locations"
        :key="i"
        :options="{ position: location }"
      />
    </MarkerCluster> `)]),_:1},8,["center"])}const Le=P(Ee,[["render",Pe]]),Fe={props:["countries"],data(){return{supplierInfo:{}}},watch:{countries(t){t.length>0&&(this.supplierInfo=t[0])}},components:{GoogleMap:Le}},Te={class:"text-center font-bold text-legal-eagle text-3xl mb-2"},Ne={class:"text-center text-dull font-medium sm:text-lg"},Me={class:"md:mt-14 mt-7 flex flex-wrap justify-center gap-3"},Ae=["onClick"],Re=["src","alt"],Be={class:"text-black lg:text-base text-sm"},Ue={key:0,class:"md:mt-14 mt-7 xl:flex grid grid-cols-2 gap-x-6 gap-y-10 rounded-[20px] lg:p-14 sm:p-10 p-6 bg-no-repeat bg-cover bg-center suppliers-bg"},Ve={class:"md:col-span-1 col-span-2 text-white flex flex-col xl:gap-7 gap-5 xl:whitespace-nowrap"},ze={class:"text-[#C9C9C9]"},Ge=["innerHTML"],De={class:"flex items-center gap-4"},Ze=["href"],Ke=["src","alt"],He={class:"md:col-span-1 col-span-2 text-white flex flex-col xl:gap-7 gap-5"},Je={class:"flex gap-4"},Qe={class:"flex gap-4"},Xe={class:"flex gap-4"},Ye={class:"col-span-2 xl:min-w-[375px] min-w-full h-[230px]"};function We(t,e,o,i,s,n){const a=q("google-map");return u(),f("div",null,[r("h1",Te,c(t.$t("Suppliers")),1),r("p",Ne,c(t.$t("Select any supplier and Contact with him")),1),r("div",Me,[(u(!0),f(U,null,V(o.countries,(l,h)=>(u(),f("div",{key:h},[r("div",{onClick:y=>s.supplierInfo=l,class:z(`${s.supplierInfo.id===l.id?"bg-[#F3F8FF]":""} lg:w-[200px] w-auto flex items-center lg:gap-2 gap-1 py-4 px-3 lg:rounded-2xl rounded-xl shadow-[0px_4px_12px_0px_#00000040] cursor-pointer select-none`)},[r("img",{src:l.image,alt:`${l.name} Logo`,class:"lg:w-[50px] w-[30px] lg:h-[40px] h-[20px]"},null,8,Re),r("p",Be,c(l.name),1)],10,Ae)]))),128))]),s.supplierInfo&&s.supplierInfo.contact_info?(u(),f("div",Ue,[r("div",Ve,[e[0]||(e[0]=r("p",{class:"font-bold text-2xl"},"Contact Information",-1)),r("p",ze,c(s.supplierInfo.contact_info[0][`desc_${t.$i18n.locale}`]),1),r("p",{innerHTML:s.supplierInfo.contact_info[0][`work_hours_${t.$i18n.locale}`]?s.supplierInfo.contact_info[0][`work_hours_${t.$i18n.locale}`].replace(/\r?\n/g,"<br>"):""},null,8,Ge),r("div",De,[(u(!0),f(U,null,V(s.supplierInfo.social_media,(l,h)=>(u(),f("div",{key:h,class:"w-8 h-8 rounded-full bg-black flex items-center justify-center p-2 cursor-pointer hover:bg-[#12284A]"},[r("a",{href:l.link,target:"_blank",rel:"noopener noreferrer"},[r("img",{class:"max-w-4 max-h-4",src:l.image,alt:l.type},null,8,Ke)],8,Ze)]))),128))])]),r("div",He,[r("div",Je,[e[1]||(e[1]=r("p",{class:"material-symbols-rounded"},"phone_in_talk",-1)),r("p",null,c(s.supplierInfo.contact_info[0].phone),1)]),r("div",Qe,[e[2]||(e[2]=r("p",{class:"material-symbols-rounded"},"mail",-1)),r("p",null,c(s.supplierInfo.contact_info[0].email),1)]),r("div",Xe,[e[3]||(e[3]=r("p",{class:"material-symbols-rounded"},"location_on",-1)),r("p",null,c(s.supplierInfo.contact_info[0].address),1)])]),r("div",Ye,[N(a,{center:{lat:Number(s.supplierInfo.contact_info[0].lat),lng:Number(s.supplierInfo.contact_info[0].lng)}},null,8,["center"])])])):x("v-if",!0)])}const et=P(Fe,[["render",We]]),tt={props:["contactInfo"],data(){return{loading:!1,dataObj:{first_name:"",last_name:"",email:"",phone:"",type:"",message:""},valid:{first_name:!0,last_name:!0,email:!0,phone:!0,type:!0,message:!0}}},computed:{emailValid(){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(this.dataObj.email)},phoneValid(){return/^[0-9]{11}$/.test(this.dataObj.phone)},messageValid(){return this.dataObj.message.length>=5}},methods:{validateForm(){this.valid.first_name=this.dataObj.first_name.trim()!=="",this.valid.last_name=this.dataObj.last_name.trim()!=="",this.valid.email=this.emailValid,this.valid.phone=this.phoneValid,this.valid.type=this.dataObj.type.trim()!=="",this.valid.message=this.messageValid},async sendForm(){if(this.validateForm(),Object.values(this.valid).every(t=>t===!0)){this.loading=!0;try{await A.post("https://admin.valueerp.net/api/contact/send",this.dataObj),this.dataObj={first_name:"",last_name:"",email:"",phone:"",type:"",message:""}}catch{}finally{this.loading=!1}}}}},st={key:0,class:"fixed inset-0 h-dvh flex items-center justify-center bg-white bg-opacity-90 z-50"},ot={class:"text-center font-bold text-legal-eagle text-3xl mb-2"},rt={class:"text-center text-dull font-medium sm:text-lg"},at={class:"mt-7 bg-white rounded-xl md:p-14 sm:p-10 p-6",style:{"box-shadow":"0px 0px 60px 30px #00000008"}},it={class:"text-night-sky grid sm:grid-cols-2 grid-cols-1 lg:gap-8 gap-6"},nt={class:"md:col-span-1 sm:col-span-1 col-span-2"},lt={for:"firstName",class:"block mb-2"},dt=["placeholder"],ct={key:0,class:"text-red-500 text-xs"},pt={class:"md:col-span-1 sm:col-span-1 col-span-2"},ut={for:"lastName",class:"block mb-2"},mt=["placeholder"],ht={key:0,class:"text-red-500 text-xs"},ft={class:"md:col-span-1 sm:col-span-1 col-span-2"},gt={for:"email",class:"block mb-2"},bt=["placeholder"],vt={key:0,class:"text-red-500 text-xs"},yt={class:"md:col-span-1 sm:col-span-1 col-span-2"},_t={for:"phone",class:"block mb-2"},xt=["placeholder"],kt={key:0,class:"text-red-500 text-xs"},wt={class:"col-span-2"},Ot={class:"mb-3"},Ct={class:"grid lg:grid-cols-4 sm:grid-cols-2 grid-cols-1 gap-y-2 gap-x-4"},It={class:"subject ms-5 items-center"},St={class:"relative cursor-pointer text-xs text-black",for:"sales"},jt={class:"subject ms-5 items-center"},$t={class:"relative cursor-pointer text-xs text-black",for:"technicalSupport"},qt={class:"subject ms-5 items-center"},Et={class:"relative cursor-pointer text-xs text-black",for:"partnerships"},Pt={class:"subject ms-5 items-center"},Lt={class:"relative cursor-pointer text-xs text-black",for:"generalInquiry"},Ft={key:0,class:"text-red-500 text-xs"},Tt={class:"col-span-2"},Nt={for:"message",class:"block mb-2"},Mt=["placeholder"],At={key:0,class:"text-red-500 text-xs"},Rt={class:"col-span-2"};function Bt(t,e,o,i,s,n){return u(),f("div",null,[x(" Loading "),s.loading?(u(),f("div",st,[...e[10]||(e[10]=[r("div",{class:"border-4 border-y-ambassador-blue border-x-inherit border-solid w-10 h-10 rounded-full animate-spin"},null,-1)])])):x("v-if",!0),r("p",ot,c(t.$t("Contact US")),1),r("p",rt,c(t.$t("Any question or remarks? Just write us a message!")),1),r("div",at,[r("div",it,[r("div",nt,[r("label",lt,c(t.$t("First Name")),1),w(r("input",{"onUpdate:modelValue":e[0]||(e[0]=a=>s.dataObj.first_name=a),id:"firstName",type:"text",placeholder:t.$t("Add First Name"),class:"text-sm w-full border border-solid border-[#F2F2F2] rounded-md outline-none py-3 px-4"},null,8,dt),[[E,s.dataObj.first_name]]),s.valid.first_name?x("v-if",!0):(u(),f("span",ct,c(t.$t("First Name is required")),1))]),r("div",pt,[r("label",ut,c(t.$t("Last Name")),1),w(r("input",{"onUpdate:modelValue":e[1]||(e[1]=a=>s.dataObj.last_name=a),id:"lastName",type:"text",placeholder:t.$t("Add Last Name"),class:"text-sm w-full border border-solid border-[#F2F2F2] rounded-md outline-none py-3 px-4"},null,8,mt),[[E,s.dataObj.last_name]]),s.valid.last_name?x("v-if",!0):(u(),f("span",ht,c(t.$t("Last Name is required")),1))]),r("div",ft,[r("label",gt,c(t.$t("Email")),1),w(r("input",{"onUpdate:modelValue":e[2]||(e[2]=a=>s.dataObj.email=a),id:"email",type:"text",placeholder:t.$t("Add Email"),class:"text-sm w-full border border-solid border-[#F2F2F2] rounded-md outline-none py-3 px-4"},null,8,bt),[[E,s.dataObj.email]]),s.valid.email?x("v-if",!0):(u(),f("span",vt,c(t.$t("Please enter a valid email")),1))]),r("div",yt,[r("label",_t,c(t.$t("Phone Number")),1),w(r("input",{"onUpdate:modelValue":e[3]||(e[3]=a=>s.dataObj.phone=a),id:"phone",type:"text",placeholder:t.$t("Add Phone Number"),class:"text-sm w-full border border-solid border-[#F2F2F2] rounded-md outline-none py-3 px-4"},null,8,xt),[[E,s.dataObj.phone]]),s.valid.phone?x("v-if",!0):(u(),f("span",kt,c(t.$t("Please enter a valid phone number")),1))]),r("div",wt,[r("p",Ot,c(t.$t("Select Subject?")),1),r("div",Ct,[r("div",It,[w(r("input",{"onUpdate:modelValue":e[4]||(e[4]=a=>s.dataObj.type=a),value:"sales",type:"radio",class:"cursor-pointer",name:"subject",id:"sales"},null,512),[[F,s.dataObj.type]]),r("label",St,c(t.$t("Sales")),1)]),r("div",jt,[w(r("input",{"onUpdate:modelValue":e[5]||(e[5]=a=>s.dataObj.type=a),value:"technical_support",type:"radio",class:"cursor-pointer",name:"subject",id:"technicalSupport"},null,512),[[F,s.dataObj.type]]),r("label",$t,c(t.$t("Technical support")),1)]),r("div",qt,[w(r("input",{"onUpdate:modelValue":e[6]||(e[6]=a=>s.dataObj.type=a),value:"partnerships",type:"radio",class:"cursor-pointer",name:"subject",id:"partnerships"},null,512),[[F,s.dataObj.type]]),r("label",Et,c(t.$t("Partnerships")),1)]),r("div",Pt,[w(r("input",{"onUpdate:modelValue":e[7]||(e[7]=a=>s.dataObj.type=a),value:"general_inquiry",type:"radio",class:"cursor-pointer",name:"subject",id:"generalInquiry"},null,512),[[F,s.dataObj.type]]),r("label",Lt,c(t.$t("General Inquiry")),1)])]),s.valid.type?x("v-if",!0):(u(),f("span",Ft,c(t.$t("Subject is required")),1))]),r("div",Tt,[r("label",Nt,c(t.$t("Message")),1),w(r("textarea",{"onUpdate:modelValue":e[8]||(e[8]=a=>s.dataObj.message=a),name:"message",id:"message",placeholder:t.$t("Write your message"),rows:"3",class:"resize-none text-sm w-full border border-solid border-[#F2F2F2] rounded-md outline-none py-3 px-4"},null,8,Mt),[[E,s.dataObj.message]]),s.valid.message?x("v-if",!0):(u(),f("span",At,c(t.$t("Message must be at least 5 characters")),1))]),r("div",Rt,[r("button",{onClick:e[9]||(e[9]=a=>n.sendForm()),class:"w-full bg-[#E84E0C] text-white rounded-lg font-medium md:text-base text-sm py-3 px-8"},c(t.$t("Send")),1)])])])])}const Ut=P(tt,[["render",Bt]]),Vt="/assets/static/faq.Dub-ebTj.png",zt={props:["faq"],watch:{faq(){this.faq.forEach((t,e)=>{t.isOpen=e===0})}},methods:{toggleAccordion(t){this.faq.forEach((e,o)=>{e.isOpen=t===o})}}},Gt={class:"grid lg:grid-cols-2 grid-cols-1 items-center lg:gap-10 gap-6"},Dt={class:"text-legal-eagle col-span-1"},Zt={class:"font-bold text-3xl md:mb-4 mb-2"},Kt={class:"flex flex-col gap-4 mt-10"},Ht=["onClick"],Jt={class:"sm:font-semibold font-medium sm:text-base text-sm"},Qt={class:"material-symbols-rounded text-xl leading-none"};function Xt(t,e,o,i,s,n){return u(),f("div",Gt,[r("div",Dt,[r("p",Zt,c(t.$t("Frequently Asked Questions")),1),r("p",null,c(t.$t("Lorem ipsum dolor sit amet consectetur adipiscing eli mattis sit phasellus mollis sit aliquam sit nullam.")),1),r("div",Kt,[(u(!0),f(U,null,V(o.faq,(a,l)=>(u(),f("div",{key:l,class:z(`sm:px-6 p-4 border border-solid border-[#E1E4ED] ${a.isOpen?"rounded-2xl bg-[#F1F3F7]":"rounded-full shadow-sm"}`)},[r("div",{onClick:h=>n.toggleAccordion(l),class:"cursor-pointer flex items-center justify-between"},[r("p",Jt,c(a[`question_${t.$i18n.locale}`]),1),r("span",Qt,c(a.isOpen?"close":"add"),1)],8,Ht),r("p",{class:z(`sm:text-sm text-xs mt-2 ${a.isOpen?"block":"hidden"}`)},c(a[`answer_${t.$i18n.locale}`]),3)],2))),128))])]),e[0]||(e[0]=r("div",{class:"col-span-1"},[r("img",{src:Vt,class:"sm:w-3/4 w-full m-auto",alt:"Frequently asked questions"})],-1))])}const Yt=P(zt,[["render",Xt]]),Wt={data(){return{faq:[],countries:[],loading:!1}},methods:{async loadCountries(){this.loading=!0;try{const t=await A.get("https://admin.valueerp.net/api/countries");this.countries=t.data.data.data}catch{}finally{this.loading=!1}},async loadContactInformation(){this.loading=!0;try{const t=await A.get("https://admin.valueerp.net/api/ContactInformation");this.faq=t.data.data.faq}catch{}finally{this.loading=!1}}},components:{Suppliers:et,ContactUs:Ut,FAQ:Yt},async serverPrefetch(){await Promise.all([this.loadCountries(),this.loadContactInformation()])},created(){typeof window<"u"&&(this.loadCountries(),this.loadContactInformation())}},es={key:0,class:"fixed inset-0 h-dvh flex items-center justify-center bg-white bg-opacity-90 z-50"};function ts(t,e,o,i,s,n){const a=q("suppliers"),l=q("contact-us"),h=q("FAQ");return u(),f("div",null,[x(" Loading "),s.loading?(u(),f("div",es,[...e[0]||(e[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)])])):x("v-if",!0),N(a,{countries:s.countries,class:"mt-24 max-w-screen-2xl mx-auto xl:px-32 lg:px-16 md:px-12 sm:px-8 px-6"},null,8,["countries"]),N(l,{class:"mt-16 max-w-screen-2xl mx-auto xl:px-32 lg:px-16 md:px-12 sm:px-8 px-6"}),s.faq.length>0?(u(),ee(h,{key:1,faq:s.faq,class:"mt-16 max-w-screen-2xl mx-auto xl:px-32 lg:px-16 md:px-12 sm:px-8 px-6"},null,8,["faq"])):x("v-if",!0)])}const ls=P(Wt,[["render",ts]]);export{ls as default};
