import{C as e,D as t,E as n,J as r,K as i,M as a,b as o,gt as s,h as c,j as l,kt as u,r as d,st as f,w as p,wt as m}from"./dist-B4ulKgpj.js";import{t as h}from"./FrontOfficeLayout-PUirTnzN.js";var g={id:`registered-agencies`,class:`mx-auto max-w-6xl scroll-mt-32 px-4 py-14 sm:px-6`},_={class:`rounded-xl border border-[#d9e3ef] bg-white p-5`},v={id:`search`,class:`mb-4 flex scroll-mt-28 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`},y={class:`overflow-x-auto`},b={class:`min-w-full divide-y divide-[#e6edf5]`},x={class:`divide-y divide-[#eef3f8] text-sm`},S={class:`px-3 py-3 font-medium`},C={class:`px-3 py-3 text-[#234e7a]`},w={class:`px-3 py-3 text-[#234e7a]`},T={class:`grid`},E={class:`grid`},D={class:`flex justify-center px-3 py-3 text-[#234e7a]`},O=[`src`],k={class:`px-3 py-3`},A={class:`rounded-full bg-[#e7f4ea] px-2 py-1 text-xs font-semibold text-[#1f6a34]`},j={key:0,class:`mt-4 text-sm text-[#436489]`},M={class:`mt-5 flex flex-col gap-3 border-t border-[#e6edf5] pt-4 text-sm text-[#436489] sm:flex-row sm:items-center sm:justify-between`},N=a({layout:h,__name:`ApprovedAgents`,props:{agents:{}},setup(a){let h=a,N=e(()=>Array.isArray(h.agents)?h.agents:h.agents?.data??[]),P=s(``),F=e(()=>N.value.filter(e=>{let t=P.value.trim().toLowerCase();return t?e.name.toLowerCase().includes(t)||e.city.toLowerCase().includes(t)||e.license.toLowerCase().includes(t)||e.type.toLowerCase().includes(t)||e.member_logo.toLowerCase().includes(t)||e.member_logo_name.toLowerCase().includes(t):!0}));return(e,a)=>(i(),t(o,null,[l(m(d),{title:`Agents in good standing`}),a[4]||=p(`section`,{class:`bg-[#0a3160] text-white`},[p(`div`,{class:`mx-auto max-w-6xl px-4 py-14 sm:px-6`},[p(`h1`,{class:`text-3xl font-semibold md:text-4xl`},` Agents in good standing `),p(`p`,{class:`mt-4 max-w-3xl text-[#d8e8f7]`},` Registered estate agencies and agents from the EAC database. `)])],-1),p(`section`,g,[p(`div`,_,[p(`div`,v,[a[1]||=p(`h2`,{class:`text-xl font-semibold`},` Registered Estate Agencies `,-1),f(p(`input`,{"onUpdate:modelValue":a[0]||=e=>P.value=e,type:`text`,placeholder:`Search by name, city, or license`,class:`w-full rounded-md border border-[#c7d5e4] px-3 py-2 text-sm focus:border-[#0a3160] focus:outline-none sm:w-80`},null,512),[[c,P.value]])]),p(`div`,y,[p(`table`,b,[a[2]||=p(`thead`,null,[p(`tr`,{class:`text-left text-xs tracking-wide text-[#436489] uppercase`},[p(`th`,{class:`px-3 py-3`},`Agency`),p(`th`,{class:`px-3 py-3`},`City / Location`),p(`th`,{class:`px-3 py-3`},`Contacts`),p(`th`,{class:`px-3 py-3`},`Member Logo`),p(`th`,{class:`px-3 py-3`},`Compliance Status`)])],-1),p(`tbody`,x,[(i(!0),t(o,null,r(F.value,e=>(i(),t(`tr`,{key:e.id},[p(`td`,S,u(e.name),1),p(`td`,C,u(e.city),1),p(`td`,w,[p(`div`,T,`Phone: `+u(e.phone),1),p(`div`,E,`Email: `+u(e.email),1)]),p(`td`,D,[p(`img`,{src:e.member_logo,alt:``,width:`58px`},null,8,O)]),p(`td`,k,[p(`span`,A,u(e.status),1)])]))),128))])])]),F.value.length===0?(i(),t(`p`,j,` No agencies match your search. `)):n(``,!0),p(`div`,M,[p(`span`,null,`Showing `+u(F.value.length)+` of `+u(N.value.length)+` registered entries`,1),a[3]||=p(`div`,{class:`flex items-center gap-2`},[p(`button`,{type:`button`,class:`rounded border border-[#d5e1ee] px-3 py-1.5`},` Previous `),p(`button`,{type:`button`,class:`rounded bg-[#0a3160] px-3 py-1.5 text-white`},` 1 `),p(`button`,{type:`button`,class:`rounded border border-[#d5e1ee] px-3 py-1.5`},` Next `)],-1)])])])],64))}});export{N as default};