Your IP : 216.73.217.77


Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/
Upload File :
Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/ContactInfo-a865a1a3.js

import{r as k,S as C,T as S,o as a,c as n,a as t,t as e,e as p,f as _,k as g,u as r,l as B,F as m,d as x,b as f,O as b}from"./app-43851608.js";import{_ as N}from"./Dropdown-6e7c10b4.js";import{_ as Z,a as A}from"./DropdownItem-48d91d39.js";import{t as M}from"./index-17cd980e.js";const z={class:"px-20 overflow-y-scroll h-screen"},E={class:"flex justify-center space-x-8 items-center pb-6 pr-20 border-gray-300 border-b"},O={class:"rounded-full p-1"},V=["src"],D={key:1,class:"rounded-full w-40 h-40"},F=t("svg",{class:"text-gray-300",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[t("path",{"fill-rule":"evenodd",d:"M18.685 19.097A9.723 9.723 0 0021.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 003.065 7.097A9.716 9.716 0 0012 21.75a9.716 9.716 0 006.685-2.653zm-12.54-1.285A7.486 7.486 0 0112 15a7.486 7.486 0 015.855 2.812A8.224 8.224 0 0112 20.25a8.224 8.224 0 01-5.855-2.438zM15.75 9a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z","clip-rule":"evenodd"})],-1),J=[F],T={class:"text-3xl"},j={class:"text-slate-500 truncate flex items-center"},G={class:"text-sm"},I={class:"flex space-x-3 mt-4"},L={class:"bg-gray-200 h-9 px-4 rounded-md flex items-center"},R={key:0,xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 24 24"},q=t("path",{fill:"none",stroke:"currentColor","stroke-width":"1.5",d:"M9.153 5.408C10.42 3.136 11.053 2 12 2c.947 0 1.58 1.136 2.847 3.408l.328.588c.36.646.54.969.82 1.182c.28.213.63.292 1.33.45l.636.144c2.46.557 3.689.835 3.982 1.776c.292.94-.546 1.921-2.223 3.882l-.434.507c-.476.557-.715.836-.822 1.18c-.107.345-.071.717.001 1.46l.066.677c.253 2.617.38 3.925-.386 4.506c-.766.582-1.918.051-4.22-1.009l-.597-.274c-.654-.302-.981-.452-1.328-.452c-.347 0-.674.15-1.329.452l-.595.274c-2.303 1.06-3.455 1.59-4.22 1.01c-.767-.582-.64-1.89-.387-4.507l.066-.676c.072-.744.108-1.116 0-1.46c-.106-.345-.345-.624-.821-1.18l-.434-.508c-1.677-1.96-2.515-2.941-2.223-3.882c.293-.941 1.523-1.22 3.983-1.776l.636-.144c.699-.158 1.048-.237 1.329-.45c.28-.213.46-.536.82-1.182l.328-.588Z"},null,-1),H=[q],K={key:1,xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 24 24"},P=t("path",{fill:"#031b4d",stroke:"#031b4d","stroke-width":"1.5",d:"M9.153 5.408C10.42 3.136 11.053 2 12 2c.947 0 1.58 1.136 2.847 3.408l.328.588c.36.646.54.969.82 1.182c.28.213.63.292 1.33.45l.636.144c2.46.557 3.689.835 3.982 1.776c.292.94-.546 1.921-2.223 3.882l-.434.507c-.476.557-.715.836-.822 1.18c-.107.345-.071.717.001 1.46l.066.677c.253 2.617.38 3.925-.386 4.506c-.766.582-1.918.051-4.22-1.009l-.597-.274c-.654-.302-.981-.452-1.328-.452c-.347 0-.674.15-1.329.452l-.595.274c-2.303 1.06-3.455 1.59-4.22 1.01c-.767-.582-.64-1.89-.387-4.507l.066-.676c.072-.744.108-1.116 0-1.46c-.106-.345-.345-.624-.821-1.18l-.434-.508c-1.677-1.96-2.515-2.941-2.223-3.882c.293-.941 1.523-1.22 3.983-1.776l.636-.144c.699-.158 1.048-.237 1.329-.45c.28-.213.46-.536.82-1.182l.328-.588Z"},null,-1),Q=[P],U=t("button",{class:"h-9 bg-gray-200 py-2 px-3 rounded-md flex items-center"},[t("span",{class:""},[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 16 16"},[t("path",{fill:"currentColor",d:"M4 8a2 2 0 1 1-4 0a2 2 0 0 1 4 0Zm6 0a2 2 0 1 1-4 0a2 2 0 0 1 4 0Zm4 2a2 2 0 1 0 0-4a2 2 0 0 0 0 4Z"})])])],-1),W={class:"pr-20 border-gray-300 border-b py-4"},X={class:"grid grid-cols-2 space-x-8 text-[14px]"},Y={class:"text-right text-slate-500 pb-2"},tt={class:"text-right text-slate-500 pb-2"},et={class:"p-1 bg-gray-50 text-xs rounded-lg text-gray-600"},st={class:"text-right text-slate-500 pb-2"},lt={class:"text-right text-slate-500 pb-2"},at={key:0,class:"pr-20 border-gray-300 border-b py-4"},nt={class:"grid grid-cols-2 space-x-8 text-[14px]"},ot={class:"text-right text-slate-500 pb-2"},it={key:0},ct={key:1,class:"p-1 bg-slate-100 text-xs rounded-md text-gray-600"},dt={class:"pr-20 py-4"},rt={class:"grid grid-cols-2 space-x-8 text-[14px]"},ut={class:"text-right text-slate-500 pb-2"},ht={class:"text-right text-slate-500 pb-2"},vt={class:"text-right text-slate-500 pb-2"},_t={class:"text-right text-slate-500 pb-2"},pt={class:"text-right text-slate-500 pb-2"},gt={key:1,class:"pr-20 border-gray-300 border-t py-4"},mt={class:"grid grid-cols-2 space-x-8 text-[14px]"},xt={class:"text-right text-slate-500 pb-2"},ft={key:0},bt={key:1,class:"p-1 bg-slate-100 text-xs rounded-md text-gray-600"},Ct={__name:"ContactInfo",props:["contact","fields","locationSettings"],setup(h){const d=h,s=k(d.contact),u=d.contact.metadata!==null&&d.contact.metadata!==""?JSON.parse(d.contact.metadata):{};C(()=>{s.value=d.contact});const y=async()=>{s.value.is_favorite=!s.value.is_favorite,b.put("/contacts/favorite/"+s.value.uuid,{favorite:s.value.is_favorite})};S({test:null});const w=async()=>{b.visit("/contacts",{method:"delete",data:{uuids:[s.value.uuid]},preserveState:!0})},v=(l,c)=>{const o=JSON.parse(l);return o!=null&&o[c]&&(o==null?void 0:o[c])!="Not Set"?o==null?void 0:o[c]:M("not set")};return(l,c)=>{var o;return a(),n("div",z,[t("div",E,[t("div",null,[t("div",O,[s.value.avatar?(a(),n("img",{key:0,class:"rounded-full w-40 h-40",src:s.value.avatar},null,8,V)):(a(),n("div",D,J))])]),t("div",null,[t("h1",T,e(s.value.full_name),1),t("div",j,[t("span",G,e(s.value.formatted_phone_number),1)]),t("div",I,[t("button",L,[p(r(B),{href:"/contacts/"+s.value.uuid+"?edit=true",class:"text-[14px]"},{default:_(()=>[g(e(l.$t("Edit")),1)]),_:1},8,["href"])]),t("button",{onClick:c[0]||(c[0]=i=>y()),class:"bg-gray-200 h-9 px-4 rounded-md"},[s.value.is_favorite===0||s.value.is_favorite===!1?(a(),n("svg",R,H)):(a(),n("svg",K,Q))]),p(N,{class:"h-100",align:"right"},{items:_(()=>[p(Z,null,{default:_(()=>[p(A,{as:"button",onClick:c[1]||(c[1]=i=>w())},{default:_(()=>[g(e(l.$t("Delete")),1)]),_:1})]),_:1})]),default:_(()=>[U]),_:1})])])]),t("div",W,[t("div",X,[t("div",Y,[t("span",null,e(l.$t("Full name")),1)]),t("div",null,[t("span",null,e(s.value.full_name),1)]),t("div",tt,[t("span",null,e(l.$t("Group")),1)]),t("div",null,[t("span",et,e(((o=s.value.contact_group)==null?void 0:o.name)??l.$t("not set")),1)]),t("div",st,[t("span",null,e(l.$t("Email")),1)]),t("div",null,[t("span",null,e(s.value.email??l.$t("not set")),1)]),t("div",lt,[t("span",null,e(l.$t("Contact")),1)]),t("div",null,[t("span",null,e(s.value.formatted_phone_number),1)])])]),h.locationSettings==="before"&&h.fields.length>0?(a(),n("div",at,[(a(!0),n(m,null,x(d.fields,(i,$)=>(a(),n("div",nt,[t("div",ot,[t("span",null,e(l.$t(i.name)),1)]),t("div",null,[r(u)&&r(u)[i.name]!=null?(a(),n("span",it,e(r(u)[i.name]),1)):(a(),n("span",ct,e(l.$t("not set")),1))])]))),256))])):f("",!0),t("div",dt,[t("div",rt,[t("div",ut,[t("span",null,e(l.$t("Street")),1)]),t("div",null,[t("span",null,e(v(s.value.address,"street")),1)]),t("div",ht,[t("span",null,e(l.$t("City")),1)]),t("div",null,[t("span",null,e(v(s.value.address,"city")),1)]),t("div",vt,[t("span",null,e(l.$t("State")),1)]),t("div",null,[t("span",null,e(v(s.value.address,"state")),1)]),t("div",_t,[t("span",null,e(l.$t("Zip code")),1)]),t("div",null,[t("span",null,e(v(s.value.address,"zip")),1)]),t("div",pt,[t("span",null,e(l.$t("Country")),1)]),t("div",null,[t("span",null,e(v(s.value.address,"country")),1)])])]),h.locationSettings==="after"&&h.fields.length>0?(a(),n("div",gt,[(a(!0),n(m,null,x(d.fields,(i,$)=>(a(),n("div",mt,[t("div",xt,[t("span",null,e(l.$t(i.name)),1)]),t("div",null,[r(u)&&r(u)[i.name]!=null?(a(),n("span",ft,e(r(u)[i.name]),1)):(a(),n("span",bt,e(l.$t("not set")),1))])]))),256))])):f("",!0)])}}};export{Ct as _};