(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7492],{4464:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/find-practitioners",function(){return s(475)}])},475:function(e,t,s){"use strict";s.r(t);var i=s(5893),a=s(7294),n=s(1163),l=s(7317),r=s(3950),c=s(2194),o=s(141),p=s(2217),d=s(7089),u=s(9442),h=s(3645),f=s(2126),m=s(9176),v=s(2171),x=s(6127),j=s(4919),g=s(2190),N=s(2917),y=s(2984),_=s(5040),w=s(1376);s(3109);let b=["London","Manchester","Birmingham","Leeds","Glasgow","Liverpool","Newcastle","Sheffield","Bristol","Edinburgh"],k=[{label:"GP",value:"General Practitioner",Icon:o.Z},{label:"Dermatology",value:"Dermatologist",Icon:p.Z},{label:"Psychiatry",value:"Psychiatrist",Icon:d.Z},{label:"Paediatric",value:"Paediatrics",Icon:u.Z}],S=["GPs","Dermatologists","Psychiatrists","Paediatricians","Cardiologists"],C=["Skin Rash","Anxiety","Acne","Hypertension","Back Pain"];t.default=()=>{var e,t,s,o;let[p,d]=(0,a.useState)([]),[u,P]=(0,a.useState)(!0),[z,Z]=(0,a.useState)(!1),[A,L]=(0,a.useState)(""),T=(0,n.useRouter)(),[G,I]=(0,a.useState)({total_count:0,page:1,page_size:12,total_pages:0,has_next:!1,has_previous:!1,offset:0,limit:12}),[,U]=(0,a.useState)(1),[R,E]=(0,a.useState)(!1),[F,B]=(0,a.useState)(null),[D,K]=(0,a.useState)(null),[O,V]=(0,a.useState)(null),[M,H]=(0,a.useState)(!1),[W,q]=(0,a.useState)({specialties:[],languages:[]}),[X,Y]=(0,a.useState)("GPs"),[J,Q]=(0,a.useState)(0),[$,ee]=(0,a.useState)(!1),[et,es]=(0,a.useState)("Find Verified"),[ei,ea]=(0,a.useState)(!0),en=(0,a.useRef)({phase:0,index:0}),[el,er]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=()=>er(window.scrollY>40);return window.addEventListener("scroll",e,{passive:!0}),e(),()=>window.removeEventListener("scroll",e)},[]),(0,a.useEffect)(()=>{let e,t;let s=setInterval(()=>{ee(!0),e=setTimeout(()=>{let{phase:e,index:s}=en.current,i=0===e?S:C,a=s+1;if(a>=i.length){let s=(e+1)%2;en.current={phase:s,index:0},ea(!1),t=setTimeout(()=>{es(0===s?"Find Verified":"Helping With"),Y((0===s?S:C)[0]),Q(e=>e+1),ee(!1),ea(!0)},380)}else en.current.index=a,Y(i[a]),Q(e=>e+1),ee(!1)},320)},2820);return()=>{clearInterval(s),clearTimeout(e),clearTimeout(t)}},[]);let[ec,eo]=(0,a.useState)(!1),[ep,ed]=(0,a.useState)(null),[eu,eh]=(0,a.useState)(!1),[ef,em]=(0,a.useState)(null),[ev,ex]=(0,a.useState)(null),[ej,eg]=(0,a.useState)(!1),eN=(0,a.useRef)(null),ey=e=>({total_count:(null==e?void 0:e.total)||0,page:(null==e?void 0:e.page)||1,page_size:(null==e?void 0:e.page_size)||20,total_pages:(null==e?void 0:e.pages)||0,has_next:((null==e?void 0:e.page)||1)<((null==e?void 0:e.pages)||1),has_previous:((null==e?void 0:e.page)||1)>1,offset:0,limit:(null==e?void 0:e.page_size)||20}),e_=async()=>{Z(!0);try{let e=await fetch("".concat(w.sN,"/doctor/directory-profile/public/?page_size=20&page=1")),t=await e.json(),s=(null==t?void 0:t.data)||[];d(s),I(ey(t)),U(1)}catch(e){console.error("API error:",e)}finally{Z(!1),P(!1)}};(0,a.useEffect)(()=>{e_()},[]),(0,a.useEffect)(()=>{(async()=>{try{let e=await fetch("".concat(w.CT,"/patient/doctor-filter-options/")),t=await e.json();(null==t?void 0:t.status)&&(null==t?void 0:t.data)&&q({specialties:t.data.specialities||[],languages:t.data.languages||[]})}catch(e){console.error("Failed to load filter options:",e)}})()},[]),(0,a.useEffect)(()=>{if(!D&&!F&&!O&&!M){if(eN.current&&clearTimeout(eN.current),!A.trim()){e_();return}return eN.current=setTimeout(()=>{eP(A)},400),()=>{eN.current&&clearTimeout(eN.current)}}},[A,D,F,O,M]);let ew=async function(e){let{append:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=new URLSearchParams({page_size:20,page:1,...e}),i="".concat(w.sN,"/doctor/directory-profile/public/?").concat(s),a=await fetch(i),n=await a.json(),l=(null==n?void 0:n.data)||[];return t?d(e=>[...e,...l]):(d(l),U(1)),I(ey(n)),l},eb=async e=>{if(D===e){K(null),e_();return}K(e),B(null),V(null),H(!1),Z(!0);try{await ew({speciality:e})}catch(e){d([])}finally{Z(!1)}},ek=async e=>{if(F===e){B(null),e_();return}B(e),K(null),V(null),H(!1),Z(!0);try{await ew({location:e})}catch(e){d([])}finally{Z(!1)}},eS=async e=>{if(O===e){V(null),e_();return}V(e),B(null),K(null),H(!1),Z(!0);try{await ew({language:e})}catch(e){d([])}finally{Z(!1)}},eC=async()=>{if(M){H(!1),e_();return}H(!0),B(null),K(null),V(null),Z(!0);try{let e=new URLSearchParams({page_size:100,page:1}),t=await fetch("".concat(w.sN,"/doctor/directory-profile/public/?").concat(e)),s=await t.json(),i=((null==s?void 0:s.data)||[]).filter(e=>Array.isArray(e.insurers)&&e.insurers.length>0);d(i),I({...ey(s),has_next:!1}),U(1)}catch(e){d([])}finally{Z(!1)}},eP=async e=>{Z(!0);try{await ew({search:e})}catch(e){d([])}finally{Z(!1)}},ez=()=>{B(null),K(null),V(null),H(!1),L(""),e_()},eZ=F||D||O||M,eA=async()=>{if(ej||!G.has_next)return;eg(!0);let e=(G.page||1)+1;try{let t={page:e,page_size:G.page_size||20};if(D&&(t.speciality=D),F&&(t.location=F),O&&(t.language=O),M){eg(!1);return}await ew(t,{append:!0})}catch(e){console.error("Load more error:",e)}finally{eg(!1)}},eL=async e=>{let t=(null==e?void 0:e.doctor_id)||(null==e?void 0:e._id)||(null==e?void 0:e.id);if(t){ex(t);try{var s;let i=await fetch("".concat(w.CT,"/patient/public/doctor-schedule/?doctor_id=").concat(encodeURIComponent(t))),a=await i.json();(null==a?void 0:a.status)&&Array.isArray(null===(s=a.data)||void 0===s?void 0:s.available_dates)&&a.data.available_dates.length>0?(ed({...e,Health_Professional_Id:t}),eo(!0)):(em(e),eh(!0))}catch(t){em(e),eh(!0)}finally{ex(null)}}},eT=e=>{if(!((null==e?void 0:e.username)||(null==e?void 0:e._id)||(null==e?void 0:e.id)))return;let t=e.username?"/profile/".concat(encodeURIComponent(e.username)):"/profile/".concat(encodeURIComponent(e._id||e.id));window.scrollTo(0,0),T.push(t)},eG=p.filter(e=>{var t;if(!eZ||!A)return!0;let s=A.toLowerCase(),i=(e.full_name||e.name||"").toLowerCase(),a=(e.speciality||(null===(t=e.primary_specialty)||void 0===t?void 0:t.description)||"").toLowerCase(),n=(e.subspecialties||[]).map(e=>(e.name||"").toLowerCase());return i.includes(s)||a.includes(s)||n.some(e=>e.includes(s))});return(0,i.jsxs)("div",{className:"fp-container",children:[(0,i.jsxs)("div",{className:"fp-ambient","aria-hidden":"true",children:[(0,i.jsx)("div",{className:"fp-ambient-blob-1"}),(0,i.jsx)("div",{className:"fp-ambient-blob-2"})]}),(0,i.jsx)(r.Z,{title:"Find a Private GP or Specialist UK | Browse & Book Online | Virtual Triage",description:"Search and book private GPs, psychiatrists, dermatologists & specialists across the UK. Filter by specialty, location, experience & availability. GMC-verified, video consultations, same-day appointments.",keywords:"find private gp uk, online doctor uk, book gp appointment online, private gp near me, find gp uk, doctor booking online uk, healthcare practitioners uk, gp appointment booking, private psychiatrist, online dermatologist",canonical:"https://virtualtriage.ai/find-practitioners",structuredData:{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://virtualtriage.ai/find-practitioners",url:"https://virtualtriage.ai/find-practitioners",name:"Find Doctors & GPs in the UK | Book Appointments Online",description:"Search and book appointments with private GPs and online doctors across the UK.",isPartOf:{"@id":"https://virtualtriage.ai/"},inLanguage:"en-GB"},{"@type":"SearchResultsPage","@id":"https://virtualtriage.ai/find-practitioners",url:"https://virtualtriage.ai/find-practitioners",name:"Find Doctors and GPs in the UK",description:"Search for private GPs, online doctors, and healthcare practitioners in the UK.",potentialAction:{"@type":"SearchAction",target:"https://virtualtriage.ai/find-practitioners?search={search_term_string}","query-input":"required name=search_term_string"}},{"@type":"MedicalBusiness","@id":"https://virtualtriage.ai/find-practitioners",name:"Virtual Triage Doctor Search",description:"Find and book appointments with certified healthcare professionals across the UK.",serviceArea:{"@type":"Place",name:"United Kingdom"},provider:{"@id":"https://virtualtriage.ai/"},offers:{"@type":"Offer",priceCurrency:"GBP",url:"https://virtualtriage.ai/find-practitioners"}}]},location:"UK"}),(0,i.jsx)(l.Z,{}),(0,i.jsx)("section",{className:"fp-trust-banner",style:{position:"relative",zIndex:10},children:(0,i.jsxs)("div",{className:"fp-trust-inner",children:[(0,i.jsxs)("p",{className:"fp-trust-item",children:[(0,i.jsx)(h.Z,{size:14})," All Doctors GMC Verified"]}),(0,i.jsxs)("p",{className:"fp-trust-item",children:[(0,i.jsx)(f.Z,{size:14})," DSPT & GDPR Compliant"]}),(0,i.jsxs)("p",{className:"fp-trust-item",children:[(0,i.jsx)(m.Z,{size:14})," 20+ Specialists Across 15 Specialties"]}),(0,i.jsxs)("p",{className:"fp-trust-item",children:[(0,i.jsx)(v.Z,{size:14})," UK Registered Platform"]})]})}),(0,i.jsxs)("main",{className:"fp-main",children:[(0,i.jsxs)("section",{className:"fp-hero",children:[(0,i.jsxs)("h1",{className:"fp-hero-title",children:[(0,i.jsx)("span",{className:"fp-hero-static".concat(ei?" fp-hero-visible":""),children:et}),(0,i.jsx)("span",{className:"fp-hero-word-wrap".concat($?" fp-hero-word-exit":" fp-hero-word-enter"),children:(0,i.jsx)("span",{className:"fp-hero-word-text",children:X})},J)]}),(0,i.jsx)("p",{className:"fp-hero-desc",children:"Advanced triage routing connects you with top-tier practitioners instantly. Search by name, specialty, or symptom to begin."})]}),(0,i.jsx)("div",{className:"fp-search-dock".concat(el?" fp-search-dock-stuck":""),children:(0,i.jsxs)("div",{className:"fp-search-dock-inner",children:[(0,i.jsxs)("div",{className:"fp-search-wrapper",children:[(0,i.jsx)("div",{className:"fp-search-glow"}),(0,i.jsxs)("div",{className:"fp-search-bar",children:[(0,i.jsx)("span",{className:"fp-search-icon",children:(0,i.jsx)(x.Z,{size:20})}),(0,i.jsx)("input",{className:"fp-search-input",placeholder:"Search conditions, symptoms, or doctors...",value:A,onChange:e=>L(e.target.value)}),(0,i.jsx)("button",{className:"fp-search-btn",children:"Search"})]})]}),(0,i.jsxs)("div",{className:"fp-filter-chips",children:[k.map(e=>{let{label:t,value:s,Icon:a}=e;return(0,i.jsxs)("button",{className:"fp-chip".concat(D===s?" fp-chip-active":""),onClick:()=>eb(s),children:[(0,i.jsx)(a,{size:14}),t]},s)}),(0,i.jsxs)("button",{className:"fp-chip".concat(eZ&&!k.find(e=>e.value===D)?" fp-chip-active":""),onClick:()=>E(!0),children:[(0,i.jsx)(j.Z,{size:14}),"All Filters",eZ&&(0,i.jsx)("span",{className:"fp-chip-dot-indicator"})]})]}),eZ&&(0,i.jsxs)("div",{className:"fp-active-chips",children:[D&&(0,i.jsxs)("span",{className:"fp-active-chip",children:[D,(0,i.jsx)("button",{onClick:()=>{K(null),e_()},children:(0,i.jsx)(g.Z,{size:11})})]}),F&&(0,i.jsxs)("span",{className:"fp-active-chip",children:[F,(0,i.jsx)("button",{onClick:()=>{B(null),e_()},children:(0,i.jsx)(g.Z,{size:11})})]}),O&&(0,i.jsxs)("span",{className:"fp-active-chip",children:[O,(0,i.jsx)("button",{onClick:()=>{V(null),e_()},children:(0,i.jsx)(g.Z,{size:11})})]}),M&&(0,i.jsxs)("span",{className:"fp-active-chip",children:["Accepts Insurance",(0,i.jsx)("button",{onClick:()=>{H(!1),e_()},children:(0,i.jsx)(g.Z,{size:11})})]}),(0,i.jsx)("button",{className:"fp-clear-all",onClick:ez,children:"Clear all"})]})]})}),(0,i.jsx)("section",{className:"fp-grid",children:u||z?[...Array(6)].map((e,t)=>(0,i.jsxs)("div",{className:"fp-skeleton-card",children:[(0,i.jsx)("div",{className:"fp-skeleton-avatar"}),(0,i.jsxs)("div",{className:"fp-skeleton-lines",children:[(0,i.jsx)("div",{className:"fp-skeleton-line fp-skeleton-line-lg"}),(0,i.jsx)("div",{className:"fp-skeleton-line fp-skeleton-line-sm"}),(0,i.jsx)("div",{className:"fp-skeleton-line fp-skeleton-line-md"})]})]},t)):0===eG.length?(0,i.jsxs)("div",{className:"fp-empty-state",children:[(0,i.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"#c8d6e0",strokeWidth:"1.5",children:[(0,i.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,i.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),(0,i.jsx)("p",{className:"fp-empty-title",children:"No practitioners found"}),(0,i.jsx)("p",{className:"fp-empty-sub",children:"Try adjusting your filters or search term"}),(0,i.jsx)("button",{className:"fp-empty-reset",onClick:ez,children:"Reset filters"})]}):eG.map(e=>(0,i.jsx)(_.Z,{doctor:e,onViewProfile:eT,onBookAppointment:eL,isBookingLoading:ev===(e._id||e.id)},e._id||e.id))}),G.has_next&&!u&&!z&&(0,i.jsx)("div",{className:"fp-load-more-wrap",children:(0,i.jsxs)("button",{className:"fp-load-more-btn",onClick:eA,disabled:ej,children:[ej?"Loading...":"Load More Practitioners",!ej&&(0,i.jsx)(v.Z,{size:16})]})})]}),(0,i.jsx)(c.Z,{}),R&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"fp-sheet-overlay",onClick:()=>E(!1)}),(0,i.jsxs)("div",{className:"fp-sheet",role:"dialog","aria-modal":"true","aria-label":"Filters",children:[(0,i.jsx)("div",{className:"fp-sheet-handle"}),(0,i.jsxs)("div",{className:"fp-sheet-header",children:[(0,i.jsx)("span",{className:"fp-sheet-title",children:"Filters"}),(0,i.jsx)("button",{className:"fp-sheet-close",onClick:()=>E(!1),children:(0,i.jsx)(g.Z,{size:20})})]}),(0,i.jsxs)("div",{className:"fp-sheet-section",children:[(0,i.jsx)("div",{className:"fp-sheet-section-title",children:"Specialties"}),(0,i.jsx)("div",{className:"fp-sheet-options",children:W.specialties.map(e=>(0,i.jsx)("button",{className:"fp-sheet-option".concat(D===e.name?" fp-sheet-option-active":""),onClick:()=>{eb(e.name),E(!1)},children:e.name},e.id))})]}),(0,i.jsxs)("div",{className:"fp-sheet-section",children:[(0,i.jsx)("div",{className:"fp-sheet-section-title",children:"Location (UK)"}),(0,i.jsx)("div",{className:"fp-sheet-options",children:b.map(e=>(0,i.jsx)("button",{className:"fp-sheet-option".concat(F===e?" fp-sheet-option-active":""),onClick:()=>{ek(e),E(!1)},children:e},e))})]}),(0,i.jsxs)("div",{className:"fp-sheet-section",children:[(0,i.jsx)("div",{className:"fp-sheet-section-title",children:"Language"}),(0,i.jsx)("div",{className:"fp-sheet-options",children:W.languages.map(e=>(0,i.jsx)("button",{className:"fp-sheet-option".concat(O===e.name?" fp-sheet-option-active":""),onClick:()=>{eS(e.name),E(!1)},children:e.name},e.id))})]}),(0,i.jsxs)("div",{className:"fp-sheet-section",children:[(0,i.jsx)("div",{className:"fp-sheet-section-title",children:"Insurance"}),(0,i.jsx)("div",{className:"fp-sheet-options",children:(0,i.jsx)("button",{className:"fp-sheet-option".concat(M?" fp-sheet-option-active":""),onClick:()=>{eC(),E(!1)},children:"Accepts Insurance"})})]}),(0,i.jsxs)("div",{className:"fp-sheet-footer",children:[(0,i.jsx)("button",{className:"fp-sheet-reset",onClick:()=>{ez(),E(!1)},children:"Clear All"}),(0,i.jsx)("button",{className:"fp-sheet-apply",onClick:()=>E(!1),children:"Show Results"})]})]})]}),ec&&ep&&(0,i.jsx)(N.Z,{practitioner:ep,appointmentFee:null!==(t=null!==(e=null==ep?void 0:ep.initial_appointment_fee)&&void 0!==e?e:null==ep?void 0:ep.new_appointment_fee)&&void 0!==t?t:0,appointmentType:"initial",scheduleData:{initial_appointment_fee:null!==(s=null==ep?void 0:ep.initial_appointment_fee)&&void 0!==s?s:null==ep?void 0:ep.new_appointment_fee,follow_up_appointment_fee:null!==(o=null==ep?void 0:ep.follow_up_fee)&&void 0!==o?o:null==ep?void 0:ep.follow_up_appointment_fee},onClose:()=>{eo(!1),ed(null)}}),eu&&(0,i.jsx)(y.Z,{isOpen:eu,onClose:()=>{eh(!1),em(null)},doctorId:(null==ef?void 0:ef._id)||(null==ef?void 0:ef.id)||(null==ef?void 0:ef.doctor_id),doctorName:(null==ef?void 0:ef.full_name)||(null==ef?void 0:ef.name)})]})}}},function(e){e.O(0,[1890,5156,8884,7826,2888,9774,179],function(){return e(e.s=4464)}),_N_E=e.O()}]);