import{aq as h,f as p,j as y,o as c,c as u,a as S,t as q,n as f,p as _,m as $,a2 as d}from"./C_yW9YRN.js";const b=["href"],v={__name:"GeneralCallToAction",props:{text:{type:String,required:!0,default:""},icon:{required:!1,default:null},classes:{type:String,required:!0,default:""}},setup(n){const m=h(),r=p();function g(e){var i,o,l;const a=Intl.DateTimeFormat().resolvedOptions().timeZone;let t=[];e&&(a.includes("Cairo")?(t=e.filter(s=>s.phone_code=="+20"),t.length||(t=e)):a.includes("Riyadh")?(t=e.filter(s=>s.phone_code=="+966"),t.length||(t=e)):(t=e.filter(s=>s.phone_code=="+971"),t.length||(t=e))),r.value=(l=(i=t[0])==null?void 0:i.phone_code)==null?void 0:l.concat((o=t[0])==null?void 0:o.phone)}return y(()=>m,e=>{var a,t;(a=e.mainSettings)!=null&&a.phones&&g((t=e.mainSettings)==null?void 0:t.phones)},{deep:!0,immediate:!0}),(e,a)=>(c(),u("a",{href:`https://wa.me/${$(r)}${(e._.provides[d]||e.$route).query.message?"/?text="+(e._.provides[d]||e.$route).query.message:""}`,class:f(`flex items-center justify-center gap-3 w-fit ${n.classes}`),target:"_blank"},[S("span",null,q(n.text),1),n.icon?(c(),u("i",{key:0,class:f(n.icon)},null,2)):_("",!0)],10,b))}};export{v as _};
