"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9884],{iz81:function(e,i,a){a.d(i,{GE:function(){return g},ID:function(){return Z},IW:function(){return s},Kk:function(){return p},LS:function(){return h},MP:function(){return b},Ob:function(){return m},bQ:function(){return u},bp:function(){return f},cZ:function(){return l},nL:function(){return c},pf:function(){return x},qZ:function(){return v},yg:function(){return d}});var t=a("rBCA"),o=a("iBNF"),n=a("uuQu"),r=a("qQsD");let l=(0,t.Z)("div",{target:"e12jq2e0"})("padding:24px 16px;padding-bottom:40px;background:",o.r.colors.primary50,";&[data-less-card='false']{padding-right:16px;",n.M.mbUp,"{padding-bottom:40px;}}&[data-less-card='true']{",n.M.mbDown,"{padding-right:0px;}}",n.M.mbDown,"{padding-bottom:24px;margin-bottom:12px;margin-right:-1rem;margin-left:-1rem;}.container{.section{width:unset;.grid-layout{padding-right:24px;grid-column-gap:12px;height:100%;}}}.two-cards-list{display:flex;gap:12px;}.arrow-right{right:-15px;}.arrow-left{left:-15px;}.arrow-left,.arrow-right{background:white;border-radius:50%;cursor:pointer;svg{display:block;}}.doctor-title{display:flex;padding:16px 0;}.see-more{display:flex;width:30%;align-items:center;padding-left:8px;cursor:pointer;img{width:18px;height:18px;}}.service-heading{display:flex;justify-content:space-between;padding-bottom:16px;.see-more{width:25%;justify-content:flex-end;}}"),d=(0,t.Z)("div",{target:"e12jq2e1"})("display:flex;&::before{width:5px;margin-right:10px;background:",o.r.colors.primaryBase,";content:'';}p[data-size='lg']{line-height:26px;}"),c=(0,t.Z)("div",{target:"e12jq2e2"})("height:100%;width:270px;padding:16px;border:1px solid ",o.r.colors.neutral100,";background:white;border-radius:",o.r.borderRadius,";box-shadow:0px 4px 8px rgba(0,0,0,0.04),0px 0px 2px rgba(0,0,0,0.06),0px 0px 1px rgba(0,0,0,0.04);&[data-embedded-type='service']{min-height:280px;}&[data-embedded-type='doctor']{min-height:400px;[data-is-two-cards='true']{max-width:267px;}}&[data-embedded-type='hospital']{[data-is-two-cards='true']{max-width:267px;}}&[data-is-two-cards='true']{flex:1;}&[data-is-one-card='true']{width:100%;height:100%;}a{text-decoration:none;}.avatar{overflow:hidden;width:64px;height:64px;border-radius:50%;cursor:pointer;img{width:100%;height:auto;}}.name{padding-top:12px;cursor:pointer;p{display:inline-block;overflow:hidden;max-width:236px;font-weight:600;text-overflow:ellipsis;white-space:nowrap;}}.info{overflow:hidden;height:36px;}.doctor-tag{padding-top:12px;}.btn-booking{width:100%;margin-top:12px;margin-bottom:8px;}.btn-login-to-call{width:100%;height:40px;}.btn-call{width:100%;height:36px;border:none;}"),s=(0,t.Z)("div",{target:"e12jq2e3"})("padding-top:10px;border-bottom:1px dashed ",o.r.colors.neutral100,";"),h=(0,t.Z)("div",{target:"e12jq2e4"})("display:inline-block;padding:1px 12px;background:",o.r.colors.gray100,";border-radius:2px;"),p=(0,t.Z)("div",{target:"e12jq2e5"})("display:flex;flex:2;align-items:center;.icon-price{display:flex;flex-direction:column;justify-content:center;padding-right:8px;img{width:16px;height:16px;}}.text-price{padding-right:10px;}.price{font-weight:600;}&[data-type='hospital']{align-items:flex-start;.icon-price{padding-top:2px;}}.booking-list{display:inline-flex;margin-top:4px;li{padding-inline:8px;border-right:1px solid ",o.r.colors.gray200,";&:first-of-type{padding-left:0;}&:last-child{border-right:none;}}}&[data-is-one='true']{.booking-list{margin-top:0;margin-left:8px;}}"),m=(0,t.Z)("div",{target:"e12jq2e6"})("margin:12px -16px 0 -16px;background:",o.r.colors.neutral50,";cursor:pointer;.hospital-info{display:flex;padding:8px 16px;.logo{padding-right:8px;img{width:32px;height:32px;border-radius:50%;}}.hospital-detail{min-width:0;&[data-is-one-card='false']{p{display:inline-block;overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;display:inline-block;max-width:100%;}}.hospital-address{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}.hospital-name{p{font-weight:600;}}.hospital-direction{display:flex;img{width:16px;height:16px;margin-right:8px;}}}}"),g=(0,t.Z)("div",{target:"e12jq2e7"})("display:flex;.service-logo{width:48px;height:48px;margin-right:18px;cursor:pointer;}.service-name{cursor:pointer;p{display:inline-block;overflow:hidden;max-width:170px;font-weight:600;text-overflow:ellipsis;white-space:nowrap;}}"),v=(0,t.Z)("div",{target:"e12jq2e8"})("display:inline-block;padding:1px 12px;background:",o.r.colors.green50,";border-radius:2px;"),u=(0,t.Z)("div",{target:"e12jq2e9"})("border:1px solid ",o.r.colors.neutral100,";background:white;border-radius:",o.r.borderRadius,";box-shadow:0px 4px 8px rgba(0,0,0,0.04),0px 0px 2px rgba(0,0,0,0.06),0px 0px 1px rgba(0,0,0,0.04);a{text-decoration:none;}.doctor-info{display:flex;padding:16px;.main-info{flex:1;padding:0 16px;.name{cursor:pointer;p{display:inline-block;overflow:hidden;max-width:236px;font-weight:600;text-overflow:ellipsis;white-space:nowrap;}}.doctor-tag{padding-top:12px;}}.avatar{overflow:hidden;width:80px;height:80px;border-radius:50%;cursor:pointer;img{width:100%;height:auto;}}}.service-info{display:flex;padding:16px;.service-detail{flex:1;padding:0 16px;.service-name{cursor:pointer;p{display:inline-block;overflow:hidden;max-width:236px;font-weight:600;text-overflow:ellipsis;white-space:nowrap;}}.doctor-tag{padding-top:12px;}}.service-logo{overflow:hidden;width:80px;height:80px;border-radius:50%;cursor:pointer;img{width:100%;height:auto;}}}.group-btn{width:226px;.btn-booking{width:100%;margin-top:12px;margin-bottom:8px;}.btn-login-to-call{width:100%;height:40px;}.btn-call{width:100%;height:36px;border:none;}}.avatar{img{width:64px;height:64px;}}.overview{flex-grow:1;}.action-group{display:flex;justify-content:flex-start;flex-direction:row-reverse;gap:16px;width:100%;padding:8px 16px;background-color:",o.r.colors.neutral50,";}"),b=(0,t.Z)("div",{target:"e12jq2e10"})("display:flex;justify-content:space-between;padding:12px 16px;background:",o.r.colors.neutral50,";.hospital-info{display:flex;flex:3;align-items:center;padding:8px 16px;.logo{padding-right:8px;cursor:pointer;img{width:32px;height:32px;border-radius:50%;}}.hospital-direction{display:flex;img{width:16px;height:16px;margin-right:8px;}}.hospital-detail{cursor:pointer;p{display:inline-block;overflow:hidden;max-width:250px;text-overflow:ellipsis;white-space:nowrap;}.hospital-name{p{font-weight:600;}}.hospital-direction{display:flex;img{width:16px;height:16px;margin-right:8px;}}}}"),f=(0,t.Z)(r.S,{target:"e12jq2e11"})(".container .section{margin:0;}"),x=(0,t.Z)("div",{target:"e12jq2e12"})("padding:1px 8px 1px 4px;background:",o.r.colors.neutral50,";border-radius:32px;display:inline-flex;align-items:center;justify-content:center;gap:4px;"),Z=(0,t.Z)("div",{target:"e12jq2e13"})("display:flex;flex-direction:column;height:100%;justify-content:space-between;.name{p{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;}}.info{display:inline-flex;align-items:center;gap:2px;}.address{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3;white-space:normal;overflow:hidden;text-overflow:ellipsis;}&[data-is-one='true']{display:flex;padding:16px;gap:16px;}.button-group{justify-self:flex-end;}")},"l+Th":function(e,i,a){a.r(i),a.d(i,{default:function(){return B}});var t,o,n=a("BGKE"),r=a("q1tI"),l=a("09QT"),d=a("/tR3"),c=a("oQBk"),s=a("MmHG"),h=a("LL/B"),p=a("dDsW"),m=a("CJtR"),g=a("P5LW"),v=a("iz81"),careEmbedRecommendation_CareEmbedCard=e=>{let{children:i,dataDescription:a,dataEventAction:t,dataTitle:o,seeMoreSlug:l,type:d}=e,{locale:c}=(0,g.h)(),{formatMessage:u}=(0,p.Z)(),b=(0,r.useMemo)(()=>(0,m.UC)(c),[c]),f=(0,m.zs)({type:d,searchSlug:l,locale:c});return(0,n.BX)(n.HY,{children:[o&&(0,n.tZ)(v.yg,{className:"doctor-heading",children:(0,n.tZ)(s.T,{type:"bold",size:"lg",color:"#284A75",children:o})}),(0,n.BX)("div",{className:"doctor-title",children:[a&&(0,n.tZ)("div",{className:"title-text",children:(0,n.tZ)(s.T,{size:"xs",color:"#262626",children:a})}),(0,n.BX)("div",{className:"see-more",onClick:()=>{window.location.href=f},"data-event-category":"Care","data-event-action":t,"data-event-label":"".concat(b).concat(h.b).concat(f),children:[(0,n.tZ)(s.T,{size:"xs",color:"#2685F1",type:"bold",children:u({id:"articlePage.careEmbedding.seeMore",defaultMessage:"See more"})}),(0,n.tZ)("img",{loading:"lazy",src:"/images/chevronRightActive.svg",alt:""})]})]}),i]})},u=a("LgdP"),b=a("a5vB"),f=a("raAP"),x=a("rIrU"),Z=a("Zr8O"),w=a("nXqV");(t=o||(o={}))[t.NONE=0]="NONE",t[t.CHILDREN=1]="CHILDREN",t[t.ADULTS=2]="ADULTS",t[t.BOTH=3]="BOTH";let renderStatus=(e,i)=>{switch(null==e?void 0:e.provideCare){case 1:return i({id:"articlePage.careEmbedding.forChildren",defaultMessage:"For children"});case 2:return i({id:"articlePage.careEmbedding.forAdult",defaultMessage:"For adult"});case 3:return i({id:"articlePage.careEmbedding.forAdult",defaultMessage:"For both adult and children"});default:return null}};var careEmbedRecommendation_OneItemCareDoctorRecommendation=e=>{var i,a,t,o,l;let{doctorInfo:d,cityId:c}=e,{formatMessage:h}=(0,p.Z)(),{setCareType:y,setData:C,setOpenQuickBookingDrawer:k}=(0,Z.B)(e=>({setCareType:e.setCareType,setOpenQuickBookingDrawer:e.setOpenQuickBookingDrawer,setData:e.setData}),b.X),{locale:B}=(0,g.h)(),E=(0,f.U)(),T="^".concat(d.id,"^^"),D=(0,r.useMemo)(()=>(0,m.UC)(B),[B]),N=(0,m.GT)({name:d.name,id:d.id,locale:B}),S=(0,m.D4)({name:null==d?void 0:null===(i=d.hospital)||void 0===i?void 0:i.name,id:null==d?void 0:null===(a=d.hospital)||void 0===a?void 0:a.id,locale:B}),handleMakeAppointment=()=>{let e={cityId:c||0,hospitalId:d.hospital.id,doctorId:d.id,specialtyId:d.doctorSpecialties[0].id};y(w.y.DOCTOR),C(e),k(!0)};return(0,n.tZ)(v.bQ,{"data-embedded-type":"doctor",children:d&&(0,n.BX)(n.HY,{children:[(0,n.BX)("div",{className:"doctor-info",children:[(0,n.tZ)("div",{className:"avatar",onClick:handleMakeAppointment,children:(0,n.tZ)("img",{loading:"lazy",src:d.avatar,alt:"Avatar Doctor"})}),(0,n.BX)("div",{className:"main-info",children:[(0,n.tZ)("div",{className:"name",onClick:handleMakeAppointment,children:(0,n.tZ)(s.T,{size:"lg",children:d.name})}),(0,n.tZ)("div",{className:"info",children:(0,n.tZ)(s.T,{size:"n1",children:d.specialties})}),(0,n.tZ)("div",{className:"doctor-tag",children:(0,n.tZ)(v.LS,{children:(0,n.tZ)(s.T,{size:"c2",children:renderStatus(d,h)})})})]}),(0,n.BX)("div",{className:"group-btn",children:[(0,n.tZ)(u.B,{size:"md",color:"primary",className:"btn-booking",onClick:handleMakeAppointment,dataEventCategory:"Care",dataEventAction:"Embedded Doctor Appointment Click",dataEventLabel:"".concat(T).concat(E),children:h({id:"careBooking.bookAnAppointment",defaultMessage:"Book an appointment"})}),(0,n.tZ)("a",{href:N,children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Doctor Detail Click",dataEventLabel:"".concat(T).concat(D).concat(x.sb).concat(N),children:h({id:"articlePage.careEmbedding.viewDetail",defaultMessage:"View Detail"})})})]})]}),(0,n.tZ)(v.IW,{}),(0,n.BX)(v.MP,{children:[(0,n.BX)(v.Kk,{children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("img",{loading:"lazy",src:"/svg/price.svg",alt:"Price"})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.tZ)(s.T,{size:"c2",color:"#595959",children:h({id:"articlePage.careEmbedding.servicePrice",defaultMessage:"Service Price"})})}),(0,n.tZ)("div",{className:"price",children:(0,n.tZ)(s.T,{size:"c2",color:"#262626",children:"".concat(Intl.NumberFormat(B).format(parseInt(d.price))," ").concat(d.priceUnit)})})]}),(0,n.BX)("div",{className:"hospital-info",onClick:()=>{window.location.href=S},"data-event-category":"Care","data-event-action":"Embedded Doctor Get Direction Click","data-event-label":"".concat(T).concat(D).concat(x.sb).concat(S),children:[(0,n.tZ)("div",{className:"logo",children:(0,n.tZ)("img",{loading:"lazy",src:null===(t=d.hospital)||void 0===t?void 0:t.logo,alt:"Logo Hospital"})}),(0,n.BX)("div",{className:"hospital-detail",children:[(0,n.tZ)("div",{className:"hospital-name",children:(0,n.tZ)(s.T,{size:"n1",color:"#262626",children:null===(o=d.hospital)||void 0===o?void 0:o.name})}),(0,n.tZ)("div",{className:"hospital-address",children:(0,n.tZ)(s.T,{size:"n1",color:"#595959",children:null===(l=d.hospital)||void 0===l?void 0:l.address})})]}),(0,n.tZ)("div",{className:"get-direction",children:(0,n.BX)("div",{className:"hospital-direction",onClick:e=>{var i,a;e.stopPropagation(),window.location.href="/https://www.google.com/maps/search/?api=1&query=".concat(null===(i=d.hospital)||void 0===i?void 0:i.longitude,",").concat(null===(a=d.hospital)||void 0===a?void 0:a.latitude)},children:[(0,n.tZ)("img",{loading:"lazy",src:"/svg/direction.svg",alt:"Get direction"}),(0,n.tZ)(s.T,{size:"n1",color:"#2D87F3",children:h({id:"articlePage.careEmbedding.direction",defaultMessage:"Direction"})})]})})]})]})]})})},careEmbedRecommendation_SingleCareDoctorRecommendation=e=>{var i,a,t,o,l;let{doctorInfo:d,numberOfCards:c,cityId:h}=e,{formatMessage:y}=(0,p.Z)(),{locale:C}=(0,g.h)(),k=(0,f.U)(),{setCareType:B,setData:E,setOpenQuickBookingDrawer:T}=(0,Z.B)(e=>({setCareType:e.setCareType,setOpenQuickBookingDrawer:e.setOpenQuickBookingDrawer,setData:e.setData}),b.X),D="^".concat(d.id,"^^"),N=(0,r.useMemo)(()=>(0,m.UC)(C),[C]),handleMakeAppointment=()=>{let e={cityId:h||0,specialty:d.doctorSpecialties[0],doctor:d,hospital:d.hospital};B(w.y.DOCTOR),E(e),T(!0)},S=(0,m.D4)({name:null==d?void 0:null===(i=d.hospital)||void 0===i?void 0:i.name,id:null==d?void 0:null===(a=d.hospital)||void 0===a?void 0:a.id,locale:C}),A=(0,m.GT)({name:d.name,id:d.id,locale:C});return(0,n.tZ)(v.nL,{"data-embedded-type":"doctor","data-is-two-cards":2===c,"data-is-one-card":1===c,children:d&&(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",{className:"avatar",onClick:handleMakeAppointment,children:(0,n.tZ)("img",{loading:"lazy",src:d.avatar,alt:"Avatar Doctor"})}),(0,n.tZ)("div",{className:"name",onClick:handleMakeAppointment,children:(0,n.tZ)(s.T,{size:"lg",children:d.name})}),(0,n.tZ)("div",{className:"info",children:(0,n.tZ)(s.T,{size:"n1",children:d.specialties})}),(0,n.tZ)(v.IW,{}),(0,n.tZ)("div",{className:"doctor-tag",children:(0,n.tZ)(v.LS,{children:(0,n.tZ)(s.T,{size:"c2",children:renderStatus(d,y)})})}),(0,n.BX)(v.Kk,{children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("img",{loading:"lazy",src:"/svg/price.svg",alt:"Price"})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.tZ)(s.T,{size:"c2",color:"#595959",children:y({id:"articlePage.careEmbedding.servicePrice",defaultMessage:"Service Price"})})}),(0,n.tZ)("div",{className:"price",children:(0,n.tZ)(s.T,{size:"c2",color:"#262626",children:"".concat(Intl.NumberFormat(C).format(parseInt(d.price))," ").concat(d.priceUnit)})})]}),(0,n.tZ)(v.Ob,{onClick:()=>{window.location.href=S},"data-event-category":"Care","data-event-action":"Embedded Doctor Get Direction Click","data-event-label":"".concat(D).concat(N).concat(x.sb).concat(S),children:(0,n.BX)("div",{className:"hospital-info",children:[(0,n.tZ)("div",{className:"logo",children:(0,n.tZ)("img",{loading:"lazy",src:null===(t=d.hospital)||void 0===t?void 0:t.logo,alt:"Logo Hospital"})}),(0,n.BX)("div",{className:"hospital-detail","data-is-one-card":1===c,"data-is-two-cards":2===c,children:[(0,n.tZ)("div",{className:"hospital-name",children:(0,n.tZ)(s.T,{size:"n1",color:"#262626",children:null===(o=d.hospital)||void 0===o?void 0:o.name})}),(0,n.tZ)("div",{className:"hospital-address",children:(0,n.tZ)(s.T,{size:"n1",color:"#595959",children:null===(l=d.hospital)||void 0===l?void 0:l.address})}),(0,n.BX)("div",{className:"hospital-direction",onClick:e=>{var i,a;e.stopPropagation(),window.location.href="/https://www.google.com/maps/search/?api=1&query=".concat(null===(i=d.hospital)||void 0===i?void 0:i.longitude,",").concat(null===(a=d.hospital)||void 0===a?void 0:a.latitude)},children:[(0,n.tZ)("img",{loading:"lazy",src:"/svg/direction.svg",alt:"Get direction"}),(0,n.tZ)(s.T,{size:"n1",color:"#2D87F3",children:y({id:"articlePage.careEmbedding.direction",defaultMessage:"Direction"})})]})]})]})}),(0,n.tZ)(u.B,{size:"md",color:"primary",className:"btn-booking",onClick:handleMakeAppointment,dataEventCategory:"Care",dataEventAction:"Embedded Doctor Appointment Click",dataEventLabel:"".concat(D).concat(k),children:y({id:"careBooking.bookAnAppointment",defaultMessage:"Book an appointment"})}),(0,n.tZ)("a",{href:A,children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Doctor Detail Click",dataEventLabel:"".concat(D).concat(N).concat(x.sb).concat(A),children:y({id:"articlePage.careEmbedding.viewDetail",defaultMessage:"View Detail"})})})]})})},doctor=e=>{let{type:i,isMobile:a,dataId:t,dataTitle:o,dataDescription:s,scrollColumns:h=2,scrollWidth:p=576,area:m="article",isDotsShown:g,onFetchCompleted:u}=e,[b,f]=(0,r.useState)([]),[x,Z]=(0,r.useState)(""),w=(0,r.useCallback)(async()=>{var e,a;let o=await (0,l.d)(c.y.CARE.GET_CARE_LIST_EMBEDDING,{params:{type:"doctors",id:"all"!==t?t:"",type_id:"specialty_id"}},"care"),n=(null==o?void 0:null===(a=o._data)||void 0===a?void 0:null===(e=a.doctors)||void 0===e?void 0:e.map(d.XR))||[],r=n.slice(0,4);f(r),u&&u(r,i)},[u]),y=(0,r.useCallback)(async()=>{let e=await (0,l.d)(c.y.CARE.GET_CARE_SPECIALTY_DETAIL,{params:{specialtyId:t}},"care");if((null==e?void 0:e._status)===1){var i,a;let{_data:t}=e;Z(null!==(a=null===(i=t.specialty)||void 0===i?void 0:i.slug)&&void 0!==a?a:"")}},[t]);(0,r.useEffect)(()=>{w(),y()},[]);let C=(0,r.useMemo)(()=>"boolean"==typeof g?g:!a&&b.length>2,[a,b.length,g]),renderDoctorsScrollList=()=>(0,n.tZ)(v.bp,{column:h,row:1,isDotsShown:C,mode:"infinity",type:"separated",isArrowShown:!a,customPageWidth:p,children:null==b?void 0:b.map((e,i)=>(0,n.tZ)(careEmbedRecommendation_SingleCareDoctorRecommendation,{doctorInfo:e,numberOfCards:b.length},i))});return(0,n.tZ)(n.HY,{children:(null==b?void 0:b.length)>0&&(0,n.tZ)(v.cZ,{"data-is-one-two-card":(null==b?void 0:b.length)<=2,children:b.length>0&&(0,n.tZ)(careEmbedRecommendation_CareEmbedCard,{dataDescription:s,dataEventAction:"Embedded Doctor See Next Click",dataTitle:o,seeMoreSlug:x,type:i,children:(()=>{if("sidebar"===m){if(1===b.length)return(0,n.tZ)(careEmbedRecommendation_SingleCareDoctorRecommendation,{doctorInfo:b[0],numberOfCards:1});if(b.length>=2)return renderDoctorsScrollList()}return 1===b.length?a?(0,n.tZ)(careEmbedRecommendation_SingleCareDoctorRecommendation,{doctorInfo:b[0],numberOfCards:1}):(0,n.tZ)(careEmbedRecommendation_OneItemCareDoctorRecommendation,{doctorInfo:b[0]}):2!==b.length||a?renderDoctorsScrollList():(0,n.tZ)("div",{className:"two-cards-list",children:b.map(e=>(0,n.tZ)(careEmbedRecommendation_SingleCareDoctorRecommendation,{doctorInfo:e,numberOfCards:2},e.id))})})()})})})},y=a("iBNF"),C=a("Zr3N"),careEmbedRecommendation_OneItemCareHospitalRecommendation=e=>{let{hospitalInfo:i}=e,{formatMessage:a}=(0,p.Z)(),{locale:t}=(0,g.h)(),o=(0,f.U)(),handleMakeAppointment=()=>null,[r]=(0,C.A)();return(0,n.BX)(v.bQ,{"data-embedded-type":"hospital",children:[i&&(0,n.BX)(v.ID,{"data-is-one":"true",children:[(0,n.tZ)("div",{className:"avatar",children:(0,n.tZ)("a",{href:(0,m.D4)({locale:t,id:i.id,name:i.name,slug:i.slug}),children:(0,n.tZ)("img",{loading:"lazy",src:i.logo,alt:"Avatar Doctor"})})}),(0,n.BX)("div",{className:"overview",children:[(0,n.tZ)("div",{className:"name",onClick:handleMakeAppointment,children:(0,n.tZ)("a",{href:(0,m.D4)({locale:t,id:i.id,name:i.name,slug:i.slug}),children:(0,n.tZ)(s.T,{size:"lg",children:i.name})})}),(0,n.BX)("div",{className:"info",children:[(0,n.BX)(v.pf,{children:[(0,n.tZ)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:(0,n.tZ)("path",{fill:"#FFB521",d:"M8 11.513l3.447 2.08a.335.335 0 00.5-.36l-.913-3.92 3.04-2.633a.335.335 0 00-.194-.587l-4.006-.34L8.307 2.06a.332.332 0 00-.613 0L6.127 5.753l-4.007.34a.334.334 0 00-.186.587l3.04 2.633-.914 3.92a.335.335 0 00.5.36L8 11.513z"})}),(0,n.BX)(s.T,{size:"s4",type:"semiBold",children:[Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:1}).format(Number(i.rating)),"/5"]})]}),(0,n.BX)(s.T,{size:"s4",color:y.r.colors.gray600,style:{textDecorationLine:"underline"},children:[i.totalReviews||0," Patient Stories"]})]}),(0,n.BX)(v.Kk,{style:{marginTop:"8px"},as:"a","data-type":"hospital",href:"https://www.google.com/maps/search/?api=1&query=".concat(i.longitude,",").concat(i.latitude),children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:(0,n.tZ)("path",{fill:"#8C8C8C",d:"M8 1.333A4.667 4.667 0 003.333 6c0 2.644 2.936 6.547 4.151 8.047.267.33.765.33 1.032 0 1.215-1.5 4.15-5.403 4.15-8.047A4.667 4.667 0 008 1.333zm0 6.334a1.666 1.666 0 110-3.333 1.666 1.666 0 010 3.333z"})})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.gray600,className:"address",children:i.address})})]}),(0,n.BX)(v.Kk,{"data-type":"hospital","data-is-one":"true",style:{marginTop:"8px"},children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:(0,n.tZ)("path",{fill:"#8C8C8C",d:"M8 1.333A6.663 6.663 0 002.667 4h1.812A5.348 5.348 0 018 2.667c1.31 0 2.56.49 3.521 1.333h1.813A6.663 6.663 0 008 1.333zM2.23 4.668c-.568 1.765-.897 3.812-.897 6 0 1.4.128 2.747.375 4h12.584c.247-1.253.375-2.6.375-4 0-2.188-.328-4.235-.896-6H2.229zm5.77 2a3.333 3.333 0 110 6.666 3.333 3.333 0 010-6.666zM7.333 8v1.334H6v1.333h1.333V12h1.334v-1.333H10V9.334H8.667V8H7.334z"})})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.BX)(s.T,{size:"p4",color:y.r.colors.gray600,children:["Available for booking:",(0,n.BX)("ul",{className:"booking-list",children:[i.totalAvailableDoctors>0&&(0,n.tZ)("li",{children:(0,n.tZ)("a",{href:"".concat((0,m.D4)({locale:t,id:i.id,name:i.name,slug:i.slug}),"?tab=").concat(r.doctors),children:(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.primaryBase,children:"Doctors"})})}),i.totalAvailableServices>0&&(0,n.tZ)("li",{children:(0,n.tZ)("a",{href:"".concat((0,m.D4)({locale:t,id:i.id,name:i.name,slug:i.slug}),"?tab=").concat(r.services),children:(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.primaryBase,children:"Services"})})})]})]})})]})]})]}),(0,n.BX)("div",{className:"action-group",children:[(0,n.tZ)(u.B,{size:"md",color:"primary",className:"btn-booking",onClick:handleMakeAppointment,dataEventCategory:"Care",dataEventAction:"Embedded Doctor Appointment Click",dataEventLabel:o,children:a({id:"careBooking.bookAnAppointment",defaultMessage:"Book now"})}),(0,n.tZ)("a",{href:(0,m.D4)({locale:t,id:i.id,name:i.name,slug:i.slug}),children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Doctor Detail Click",dataEventLabel:o,children:a({id:"articlePage.careEmbedding.viewDetail",defaultMessage:"View Detail"})})})]})]})},careEmbedRecommendation_SingleCareHospitalRecommendation=e=>{let{hospitalInfo:i,numberOfCards:a,cityId:t}=e,{formatMessage:o}=(0,p.Z)(),{locale:r}=(0,g.h)(),d=(0,f.U)(),{setCareType:h,setData:x,setOpenQuickBookingDrawer:k}=(0,Z.B)(e=>({setCareType:e.setCareType,setOpenQuickBookingDrawer:e.setOpenQuickBookingDrawer,setData:e.setData}),b.X),handleMakeAppointment=async()=>{if(i.id){var e,a,o,n,r,d;let s=await (0,l.d)(c.y.CARE.GET_HOSPITAL_DETAIL,{params:{id:i.id}},"care"),p=s._data.branch,m=await (0,l.d)(c.y.CARE.GET_BRANCH_DETAIL,{params:{id:i.id,type:i.totalAvailableDoctors>0?"doctor":"service"}},"care"),g=null==m?void 0:null===(e=m._data)||void 0===e?void 0:e.searches;if(null==g?void 0:g[0]){if(i.totalAvailableDoctors>0){let e={cityId:t||0,specialty:g[0].specialties_transform[0],doctor:g[0],hospital:g[0].hospital_branch};h(w.y.DOCTOR),x(e),k(!0)}else if(p.total_available_service>0){let e={cityId:t||0,serviceType:{id:g[0].service_id,name:g[0].name,logo:g[0].logo,slug:g[0].slug},service:{id:null===(a=g[0].hospital_branch)||void 0===a?void 0:a.id,name:null===(o=g[0].hospital_branch)||void 0===o?void 0:o.name,logo:null===(n=g[0].hospital_branch)||void 0===n?void 0:n.logo,price:null===(r=g[0].hospital_branch)||void 0===r?void 0:r.price,priceUnit:(null===(d=g[0].hospital_branch)||void 0===d?void 0:d.price_unit)||"",serviceId:g[0].id}};h(w.y.DOCTOR),x(e),k(!0)}}}},[B]=(0,C.A)();return(0,n.tZ)(v.nL,{"data-embedded-type":"hospital","data-is-two-cards":2===a,"data-is-one-card":1===a,children:i&&(0,n.BX)(v.ID,{children:[(0,n.BX)("div",{children:[(0,n.tZ)("div",{className:"avatar",children:(0,n.tZ)("a",{href:(0,m.D4)({locale:r,id:i.id,name:i.name,slug:i.slug}),children:(0,n.tZ)("img",{loading:"lazy",src:i.logo,alt:"Avatar Doctor"})})}),(0,n.tZ)("div",{className:"name",onClick:handleMakeAppointment,children:(0,n.tZ)("a",{href:(0,m.D4)({locale:r,id:i.id,name:i.name,slug:i.slug}),"data-event-category":"Care","data-event-action":"Embedded Hospital - Name Click","data-event-label":d,children:(0,n.tZ)(s.T,{size:"lg",children:i.name})})})]}),(0,n.BX)("div",{className:"info-wrapper",children:[(0,n.BX)("div",{className:"info",children:[(0,n.BX)(v.pf,{children:[(0,n.tZ)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:(0,n.tZ)("path",{fill:"#FFB521",d:"M8 11.513l3.447 2.08a.335.335 0 00.5-.36l-.913-3.92 3.04-2.633a.335.335 0 00-.194-.587l-4.006-.34L8.307 2.06a.332.332 0 00-.613 0L6.127 5.753l-4.007.34a.334.334 0 00-.186.587l3.04 2.633-.914 3.92a.335.335 0 00.5.36L8 11.513z"})}),(0,n.BX)(s.T,{size:"s4",type:"semiBold",children:[Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:1}).format(Number(i.rating)),"/5"]})]}),(0,n.BX)(s.T,{size:"s4",color:y.r.colors.gray600,style:{textDecorationLine:"underline"},children:[i.totalReviews||0," Patient Stories"]})]}),(0,n.BX)(v.Kk,{as:"a","data-type":"hospital",href:"https://www.google.com/maps/search/?api=1&query=".concat(i.longitude,",").concat(i.latitude),"data-event-category":"Care","data-event-action":"Embedded Hospital Get Direction Click","data-event-label":d,children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:(0,n.tZ)("path",{fill:"#8C8C8C",d:"M8 1.333A4.667 4.667 0 003.333 6c0 2.644 2.936 6.547 4.151 8.047.267.33.765.33 1.032 0 1.215-1.5 4.15-5.403 4.15-8.047A4.667 4.667 0 008 1.333zm0 6.334a1.666 1.666 0 110-3.333 1.666 1.666 0 010 3.333z"})})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.gray600,className:"address",children:i.address})})]}),(0,n.BX)(v.Kk,{"data-type":"hospital",style:{marginTop:"8px"},children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:(0,n.tZ)("path",{fill:"#8C8C8C",d:"M8 1.333A6.663 6.663 0 002.667 4h1.812A5.348 5.348 0 018 2.667c1.31 0 2.56.49 3.521 1.333h1.813A6.663 6.663 0 008 1.333zM2.23 4.668c-.568 1.765-.897 3.812-.897 6 0 1.4.128 2.747.375 4h12.584c.247-1.253.375-2.6.375-4 0-2.188-.328-4.235-.896-6H2.229zm5.77 2a3.333 3.333 0 110 6.666 3.333 3.333 0 010-6.666zM7.333 8v1.334H6v1.333h1.333V12h1.334v-1.333H10V9.334H8.667V8H7.334z"})})}),(0,n.BX)("div",{className:"text-price",children:[(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.gray600,children:"Available for booking:"}),(0,n.BX)("ul",{className:"booking-list",children:[i.totalAvailableDoctors>0&&(0,n.tZ)("li",{children:(0,n.tZ)("a",{href:"".concat((0,m.D4)({locale:r,id:i.id,name:i.name,slug:i.slug}),"?tab=").concat(B.doctors),"data-event-category":"Care","data-event-action":"Embedded Hospital - Booking Type Click","data-event-label":d,children:(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.primaryBase,children:"Doctors"})})}),i.totalAvailableServices>0&&(0,n.tZ)("li",{children:(0,n.tZ)("a",{href:"".concat((0,m.D4)({locale:r,id:i.id,name:i.name,slug:i.slug}),"?tab=").concat(B.services),"data-event-category":"Care","data-event-action":"Embedded Hospital - Booking Type Click","data-event-label":d,children:(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.primaryBase,children:"Services"})})})]})]})]})]}),(0,n.BX)("div",{className:"button-group",children:[(0,n.tZ)(u.B,{size:"md",color:"primary",className:"btn-booking",onClick:handleMakeAppointment,dataEventCategory:"Care",dataEventAction:"Embedded Hospital Appointment Click",dataEventLabel:d,children:o({id:"careBooking.bookAnAppointment",defaultMessage:"Book now"})}),(0,n.tZ)("a",{href:(0,m.D4)({locale:r,id:i.id,name:i.name,slug:i.slug}),"data-event-category":"Care","data-event-action":"Embedded Hospital Detail Click","data-event-label":d,children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",children:o({id:"articlePage.careEmbedding.viewDetail",defaultMessage:"View Detail"})})})]})]})})},hospital=e=>{let{type:i,isMobile:a,dataId:t,dataTitle:o,dataDescription:s,scrollColumns:h=2,scrollWidth:p=576,area:m="article",isDotsShown:g,onFetchCompleted:u}=e,[b,f]=(0,r.useState)([]),[x,Z]=(0,r.useState)(""),w=(0,r.useCallback)(async()=>{var e,a;let o=await (0,l.d)(c.y.CARE.GET_CARE_LIST_EMBEDDING,{params:{type:"hospital/branches",id:"all"!==t?t:"",type_id:"specialty_id"}},"care"),n=(null==o?void 0:null===(a=o._data)||void 0===a?void 0:null===(e=a.branches)||void 0===e?void 0:e.map(d.ZL))||[],r=n.slice(0,4);f(r),u&&u(r,i)},[u]),y=(0,r.useCallback)(async()=>{let e=await (0,l.d)(c.y.CARE.GET_CARE_SPECIALTY_DETAIL,{params:{specialtyId:t}},"care");if((null==e?void 0:e._status)===1){var i,a;let{_data:t}=e;Z(null!==(a=null===(i=t.specialty)||void 0===i?void 0:i.slug)&&void 0!==a?a:"")}},[t]);(0,r.useEffect)(()=>{w(),y()},[]);let C=(0,r.useMemo)(()=>"boolean"==typeof g?g:!a&&b.length>2,[a,b.length,g]),renderHospitalsScrollList=()=>(0,n.tZ)(v.bp,{column:h,row:1,isDotsShown:C,mode:"infinity",type:"separated",isArrowShown:!a,customPageWidth:p,children:null==b?void 0:b.map((e,i)=>(0,n.tZ)(careEmbedRecommendation_SingleCareHospitalRecommendation,{hospitalInfo:e,numberOfCards:b.length},i))});return(0,n.tZ)(n.HY,{children:(null==b?void 0:b.length)>0&&(0,n.tZ)(v.cZ,{"data-is-one-two-card":(null==b?void 0:b.length)<=2,children:b.length>0&&(0,n.tZ)(careEmbedRecommendation_CareEmbedCard,{dataDescription:s,dataEventAction:"Embedded Hospital See More Click",dataTitle:o,seeMoreSlug:x,type:i,children:(()=>{if("sidebar"===m){if(1===b.length)return(0,n.tZ)(careEmbedRecommendation_SingleCareHospitalRecommendation,{hospitalInfo:b[0],numberOfCards:1});if(b.length>=2)return renderHospitalsScrollList()}return 1===b.length?a?(0,n.tZ)(careEmbedRecommendation_SingleCareHospitalRecommendation,{hospitalInfo:b[0],numberOfCards:1}):(0,n.tZ)(careEmbedRecommendation_OneItemCareHospitalRecommendation,{hospitalInfo:b[0]}):2!==b.length||a?renderHospitalsScrollList():(0,n.tZ)("div",{className:"two-cards-list",children:b.map(e=>(0,n.tZ)(careEmbedRecommendation_SingleCareHospitalRecommendation,{hospitalInfo:e,numberOfCards:2},e.id))})})()})})})},k=a("qQsD"),careEmbedRecommendation_OneItemCareServiceRecommendation=e=>{var i,a,t,o,l;let{serviceInfo:d,cityId:c}=e,{formatMessage:h}=(0,p.Z)(),{setCareType:y,setData:C,setOpenQuickBookingDrawer:k}=(0,Z.B)(e=>({setCareType:e.setCareType,setOpenQuickBookingDrawer:e.setOpenQuickBookingDrawer,setData:e.setData}),b.X),{locale:B}=(0,g.h)(),E=(0,f.U)(),T="^^".concat(d.serviceId,"^"),D=(0,r.useMemo)(()=>(0,m.UC)(B),[B]),handleMakeAppointment=()=>{let e={cityId:c||0,hospitalId:d.hospital.id,serviceId:d.serviceId};y(w.y.SERVICE),C(e),k(!0)},N=(0,m.D4)({name:null===(i=d.hospital)||void 0===i?void 0:i.name,id:null===(a=d.hospital)||void 0===a?void 0:a.id,locale:B}),S=(0,m.wV)({name:null==d?void 0:d.name,id:null==d?void 0:d.id,locale:B}),handleClickHospital=()=>{window.location.href=N};return(0,n.BX)(v.bQ,{"data-embedded-type":"service",children:[(0,n.BX)("div",{className:"service-info",children:[(0,n.tZ)("div",{className:"service-logo",onClick:handleMakeAppointment,children:(0,n.tZ)("img",{loading:"lazy",src:"https://cdn-healthcare.hellohealthgroup.com/2021/11/1636963243_619213ab2d91e3.52220855.png",alt:"Logo Service"})}),(0,n.BX)("div",{className:"service-detail",children:[(0,n.tZ)("div",{className:"service-name",onClick:handleMakeAppointment,children:(0,n.tZ)(s.T,{size:"lg",children:null==d?void 0:d.name})}),(0,n.tZ)(v.qZ,{children:(0,n.tZ)(s.T,{size:"c2",children:h({id:"articlePage.careEmbedding.available",defaultMessage:"Available"})})})]}),(0,n.BX)("div",{className:"group-btn",children:[(0,n.tZ)(u.B,{size:"md",color:"primary",className:"btn-booking",onClick:handleMakeAppointment,dataEventCategory:"Care",dataEventAction:"Embedded Service Appointment Click",dataEventLabel:"".concat(T).concat(E),children:h({id:"articlePage.careEmbedding.bookService",defaultMessage:"Book Service"})}),(0,n.tZ)("a",{href:S,children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Service Detail Click",dataEventLabel:"".concat(T).concat(D).concat(x.sb).concat(S),children:h({id:"articlePage.careEmbedding.viewDetail",defaultMessage:"View detail"})})})]})]}),(0,n.BX)(v.MP,{children:[(0,n.BX)(v.Kk,{children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("img",{loading:"lazy",src:"/svg/price.svg",alt:"Price"})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.tZ)(s.T,{size:"c2",color:"#595959",children:h({id:"articlePage.careEmbedding.servicePrice",defaultMessage:"Service Price"})})}),(0,n.tZ)("div",{className:"price",children:(0,n.tZ)(s.T,{size:"c2",color:"#262626",children:"".concat(Intl.NumberFormat(B).format(parseInt(null==d?void 0:d.price))," ").concat(null==d?void 0:d.priceUnit)})})]}),(0,n.BX)("div",{className:"hospital-info",children:[(0,n.tZ)("div",{className:"logo",onClick:handleClickHospital,children:(0,n.tZ)("img",{loading:"lazy",src:null==d?void 0:null===(t=d.hospital)||void 0===t?void 0:t.logo,alt:"Logo Hospital"})}),(0,n.BX)("div",{className:"hospital-detail",onClick:handleClickHospital,children:[(0,n.tZ)("div",{className:"hospital-name",children:(0,n.tZ)(s.T,{size:"n1",color:"#262626",children:null==d?void 0:null===(o=d.hospital)||void 0===o?void 0:o.name})}),(0,n.tZ)("div",{className:"hospital-address",children:(0,n.tZ)(s.T,{size:"n1",color:"#595959",children:null==d?void 0:null===(l=d.hospital)||void 0===l?void 0:l.address})})]}),(0,n.tZ)("div",{className:"get-direction",children:(0,n.BX)("div",{className:"hospital-direction",onClick:e=>{var i,a;e.stopPropagation(),window.location.href="/https://www.google.com/maps/search/?api=1&query=".concat(null==d?void 0:null===(i=d.hospital)||void 0===i?void 0:i.longitude,",").concat(null==d?void 0:null===(a=d.hospital)||void 0===a?void 0:a.latitude)},children:[(0,n.tZ)("img",{loading:"lazy",src:"/svg/direction.svg",alt:"Get direction"}),(0,n.tZ)(s.T,{size:"n1",color:"#2D87F3",children:h({id:"articlePage.careEmbedding.direction",defaultMessage:"Direction"})})]})})]})]})]})},careEmbedRecommendation_SingleCareServiceRecommendation=e=>{var i,a,t,o,l;let{serviceInfo:d,numberOfCards:c,cityId:h}=e,{formatMessage:y}=(0,p.Z)(),{locale:C}=(0,g.h)(),k=(0,f.U)(),{setCareType:B,setData:E,setOpenQuickBookingDrawer:T}=(0,Z.B)(e=>({setCareType:e.setCareType,setOpenQuickBookingDrawer:e.setOpenQuickBookingDrawer,setData:e.setData}),b.X),D="^^".concat(d.serviceId,"^"),N=(0,r.useMemo)(()=>(0,m.UC)(C),[C]),handleMakeAppointment=()=>{let e={cityId:h||0,serviceType:{id:d.serviceId,name:d.name,logo:d.logo,slug:d.slug},service:{id:d.hospital.id,name:d.hospital.name,logo:d.hospital.logo,price:d.price,priceUnit:d.priceUnit,serviceId:d.id}};B(w.y.SERVICE),E(e),T(!0)},S=(0,m.D4)({name:null==d?void 0:null===(i=d.hospital)||void 0===i?void 0:i.name,id:null==d?void 0:null===(a=d.hospital)||void 0===a?void 0:a.id,locale:C}),A=(0,m.wV)({name:null==d?void 0:d.name,id:null==d?void 0:d.id,locale:C});return(0,n.tZ)(v.nL,{"data-embedded-type":"service","data-is-two-cards":2===c,"data-is-one-card":1===c,children:d&&(0,n.BX)(n.HY,{children:[(0,n.BX)(v.GE,{children:[(0,n.tZ)("div",{className:"service-logo",onClick:handleMakeAppointment,children:(0,n.tZ)("img",{loading:"lazy",src:"https://cdn-healthcare.hellohealthgroup.com/2021/11/1636963243_619213ab2d91e3.52220855.png",alt:"Logo Service"})}),(0,n.BX)("div",{className:"service-detail",children:[(0,n.tZ)("div",{className:"service-name",onClick:handleMakeAppointment,children:(0,n.tZ)(s.T,{size:"lg",children:null==d?void 0:d.name})}),(0,n.tZ)(v.qZ,{children:(0,n.tZ)(s.T,{size:"c2",children:y({id:"articlePage.careEmbedding.available",defaultMessage:"Available"})})})]})]}),(0,n.tZ)(v.Ob,{onClick:()=>{window.location.href=S},"data-event-category":"Care","data-event-action":"Embedded Service Get Direction Click","data-event-label":"".concat(D).concat(N).concat(x.sb).concat(S),children:(0,n.BX)("div",{className:"hospital-info",children:[(0,n.tZ)("div",{className:"logo",children:(0,n.tZ)("img",{loading:"lazy",src:null==d?void 0:null===(t=d.hospital)||void 0===t?void 0:t.logo,alt:"Logo Hospital"})}),(0,n.BX)("div",{className:"hospital-detail","data-is-one-card":1===c,"data-is-two-cards":2===c,children:[(0,n.tZ)("div",{className:"hospital-name",children:(0,n.tZ)(s.T,{size:"n1",color:"#262626",children:null==d?void 0:null===(o=d.hospital)||void 0===o?void 0:o.name})}),(0,n.tZ)("div",{className:"hospital-address",children:(0,n.tZ)(s.T,{size:"n1",color:"#595959",children:null==d?void 0:null===(l=d.hospital)||void 0===l?void 0:l.address})}),(0,n.BX)("div",{className:"hospital-direction",onClick:e=>{var i,a;e.stopPropagation(),window.location.href="/https://www.google.com/maps/search/?api=1&query=".concat(null==d?void 0:null===(i=d.hospital)||void 0===i?void 0:i.longitude,",").concat(null==d?void 0:null===(a=d.hospital)||void 0===a?void 0:a.latitude)},children:[(0,n.tZ)("img",{loading:"lazy",src:"/svg/direction.svg",alt:"Get direction"}),(0,n.tZ)(s.T,{size:"n1",color:"#2D87F3",children:y({id:"articlePage.careEmbedding.direction",defaultMessage:"Direction"})})]})]})]})}),(0,n.BX)(v.Kk,{children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("img",{loading:"lazy",src:"/svg/price.svg",alt:"Price"})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.tZ)(s.T,{size:"c2",color:"#595959",children:y({id:"articlePage.careEmbedding.servicePrice",defaultMessage:"Service Price"})})}),(0,n.tZ)("div",{className:"price",children:(0,n.tZ)(s.T,{size:"c2",color:"#262626",children:"".concat(Intl.NumberFormat(C).format(parseInt(null==d?void 0:d.price))," ").concat(null==d?void 0:d.priceUnit)})})]}),(0,n.tZ)(u.B,{size:"md",color:"primary",className:"btn-booking",onClick:handleMakeAppointment,dataEventCategory:"Care",dataEventAction:"Embedded Service Appointment Click",dataEventLabel:"".concat(D).concat(k),children:y({id:"articlePage.careEmbedding.bookService",defaultMessage:"Book Service"})}),(0,n.tZ)("a",{href:A,children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Service Detail Click",dataEventLabel:"".concat(D).concat(N).concat(x.sb).concat(A),children:y({id:"articlePage.careEmbedding.viewDetail",defaultMessage:"View detail"})})})]})})},service=e=>{let{type:i,isMobile:a,dataId:t,dataTitle:o,dataDescription:s,scrollColumns:h=2,scrollWidth:p=576,area:m="article",isDotsShown:g,onFetchCompleted:u}=e,[b,f]=(0,r.useState)([]),[x,Z]=(0,r.useState)(""),w=(0,r.useCallback)(async()=>{var e,a;let o=await (0,l.d)(c.y.CARE.GET_CARE_LIST_EMBEDDING,{params:{type:"hospital/services",id:"all"!==t?t:"",type_id:"service_id"}},"care"),n=(null==o?void 0:null===(a=o._data)||void 0===a?void 0:null===(e=a.services)||void 0===e?void 0:e.map(d.Yo))||[],r=n.slice(0,4);f(r),u&&u(r,i)},[u]),y=(0,r.useCallback)(async()=>{let e=await (0,l.d)(c.y.CARE.GET_CARE_SERVICE_TYPE_DETAIL,{params:{serviceTypeId:t}},"care");if((null==e?void 0:e._status)===1){var i,a;let{_data:t}=e;Z(null!==(a=null===(i=t.service_types)||void 0===i?void 0:i.slug)&&void 0!==a?a:"")}},[t]);(0,r.useEffect)(()=>{w(),y()},[]);let C=(0,r.useMemo)(()=>"boolean"==typeof g?g:!a&&b.length>2,[a,b.length,g]),renderServicesScrollList=()=>(0,n.tZ)(k.S,{column:h,row:1,isDotsShown:C,mode:"infinity",type:"separated",isArrowShown:!a,customPageWidth:p,children:null==b?void 0:b.map(e=>(0,n.tZ)(careEmbedRecommendation_SingleCareServiceRecommendation,{serviceInfo:e},e.id))});return(0,n.tZ)(n.HY,{children:(null==b?void 0:b.length)>0&&(0,n.tZ)(v.cZ,{"data-is-one-two-card":(null==b?void 0:b.length)<=2,children:b.length>0&&(0,n.tZ)(careEmbedRecommendation_CareEmbedCard,{dataDescription:s,dataEventAction:"Embedded Doctor See Next Click",dataTitle:o,seeMoreSlug:x,type:i,children:(()=>{if("sidebar"===m){if(1===b.length)return(0,n.tZ)(careEmbedRecommendation_SingleCareServiceRecommendation,{serviceInfo:b[0],numberOfCards:1});if(b.length>=2)return renderServicesScrollList()}return 1===b.length?a?(0,n.tZ)(careEmbedRecommendation_SingleCareServiceRecommendation,{serviceInfo:b[0],numberOfCards:1}):(0,n.tZ)(careEmbedRecommendation_OneItemCareServiceRecommendation,{serviceInfo:b[0]}):2!==b.length||a?renderServicesScrollList():(0,n.tZ)("div",{className:"two-cards-list",children:null==b?void 0:b.map((e,i)=>(0,n.tZ)(careEmbedRecommendation_SingleCareServiceRecommendation,{serviceInfo:e,numberOfCards:2},i))})})()})})})};let CareEmbedRecommendation=e=>(()=>{switch(e.type){case"doctor":return(0,n.tZ)(doctor,{...e});case"service":return(0,n.tZ)(service,{...e});case"hospital":return(0,n.tZ)(hospital,{...e});default:return null}})();CareEmbedRecommendation.Doctor=doctor,CareEmbedRecommendation.Service=service,CareEmbedRecommendation.Hospital=hospital;var B=CareEmbedRecommendation},iw8O:function(e,i,a){a.d(i,{Z:function(){return K}});var t=a("BGKE"),o=a("q1tI"),n=a("wp0n"),r=a("eosF"),l=a("m42D"),d=a("8vDj"),c=a("Eso5"),s=a("mYVa"),h=a("OAL+"),p=a("SPK5"),m=a("ChHM"),g=a("TYy9"),v=a.n(g),u=a("xweI"),b=a.n(u),f=a("dDsW"),x=a("09QT"),Z=a("J3uC"),w=a("oQBk"),y=a("gHFm"),C=a("ItJP"),k=a("6Eqi"),B=a("vODv"),E=a("iv2E"),T=a("hXNO"),D=a("P5LW"),N=a("rIrU");let Circle=e=>{let{color:i,...a}=e;return(0,t.tZ)("svg",{width:"327",height:"168",viewBox:"0 0 327 168",fill:"none",...a,children:(0,t.tZ)("path",{d:"M127 168C237.457 168 327 78.4569 327 -32C327 -142.457 237.457 -232 127 -232C16.5431 -232 -73 -142.457 -73 -32C-73 78.4569 16.5431 168 127 168Z",fill:i})})};var S=a("DEkF"),A=a("8wjV"),z=a("fNFL"),M=a("hEVz"),R=a("RZSM"),I=a("zwQ/"),X=a("xGJE");let Tag=e=>{let{title:i,colorShade:a,icon:r}=e,l=(0,d.rZ)(),c=(0,o.useMemo)(()=>a.split(".")[0],[]),h=(0,o.useMemo)(()=>Number(a.split(".")[1]),[]);return(0,t.BX)(p.k,{align:"center",gap:(0,s.h)(4),sx:()=>({border:"1px solid ".concat(l.colors[c][h]),backgroundColor:l.colors[c][h-1],borderRadius:(0,s.h)(34),padding:" ".concat((0,s.h)(3)," ").concat((0,s.h)(12)," ").concat((0,s.h)(3)," ").concat((0,s.h)(8))}),children:[o.cloneElement(r,{size:16,color:l.colors[c][9]}),(0,t.tZ)(n.T,{size:"n1",children:i})]})},Tags=e=>{let{hasOutpatient:i,hasTelemedicine:a,...o}=e,{formatMessage:n}=(0,f.Z)();return i||a?(0,t.BX)(p.k,{wrap:"wrap",gap:(0,s.h)(4),...o,children:[i&&(0,t.tZ)(Tag,{title:n({id:"carePathEmbedDoctor.outPatient",defaultMessage:"Out patient"}),icon:(0,t.tZ)(I.Z,{}),colorShade:"blue.1"}),a&&(0,t.tZ)(Tag,{title:n({id:"carePathEmbedDoctor.telemedicine",defaultMessage:"Telemedicine"}),icon:(0,t.tZ)(X.Z,{}),colorShade:"orange.1"})]}):null};var _=a("/npG"),P=(0,_.k)(()=>({avatar:{position:"relative",borderTopLeftRadius:"inherit"}}));let DoctorAvatar=e=>{let{doctor:i,ratio:a=1,className:o,classNames:n,styles:r,...l}=e,{classes:d,cx:h}=P(void 0,{name:"DoctorAvatar",classNames:n,styles:r}),{name:p,avatar:m,validTelemedicine:g,validOutpatient:v}=i;return(0,t.BX)(c.x,{className:h(d.avatar,o),...l,children:[(0,t.tZ)(R.o,{ratio:a,sx:{borderRadius:"inherit"},children:(0,t.tZ)(c.x,{sx:{alignItems:"flex-start !important",borderRadius:"inherit"},children:(0,t.tZ)("img",{src:m,loading:"lazy",alt:p,style:{width:"100%",maxHeight:"none"}})})}),(0,t.tZ)(Tags,{hasOutpatient:v,hasTelemedicine:g,sx:{position:"absolute",left:0,right:0,bottom:0,padding:(0,s.h)(8)}})]})};var L=(0,_.k)((e,i)=>{let{display:a}=i;return{root:{display:"flex",background:"white",borderRadius:(0,s.h)(16),boxShadow:"0px 0px 1px 0px rgba(0, 0, 0, 0.06), 0px 2px 4px 0px rgba(0, 0, 0, 0.06), 0px 2px 4px 0px rgba(0, 0, 0, 0.06)",..."vertical"===a?{flexDirection:"column",justifyContent:"space-between",alignItems:"stretch",gap:(0,s.h)(0)}:{}},avatar:{position:"relative",borderTopLeftRadius:"inherit",..."vertical"===a?{borderTopRightRadius:"inherit"}:{borderBottomLeftRadius:"inherit",width:(0,s.h)(240),height:(0,s.h)(240)}},info:{..."vertical"===a&&{padding:"".concat((0,s.h)(12)," ").concat((0,s.h)(16))}},btn:{..."vertical"===a?{width:"100%"}:{minWidth:(0,s.h)(132)}}}}),H=a("e6wM"),O=a("mlYt");let Info=e=>{let{item:i,hidePrice:a,hideRating:o,hrefProps:r,...l}=e,{locale:d}=(0,D.h)(),{name:m,rating:g,doctorSpecialties:v=[],hospital:u,price:b,priceUnit:f,originalPrice:x,cityName:Z}=i,w=Math.floor(Number(g)),y=w>0?(0,t.BX)(p.k,{gap:(0,s.h)(8),align:"center",children:[(0,t.tZ)(M.i,{defaultValue:w,readOnly:!0}),(0,t.BX)(n.T,{size:"s4",weight:"semiBold",children:[parseFloat(g),"/5"]})]}):null;return(0,t.tZ)(h.K,{spacing:(0,s.h)(8),justify:"space-between",...l,children:(0,t.BX)(h.K,{spacing:(0,s.h)(8),children:[(0,t.tZ)("a",{...r,children:(0,t.tZ)(n.T,{size:"s3",weight:"semiBold",children:m})}),!o&&y,(0,t.BX)(h.K,{spacing:(0,s.h)(4),children:[!a&&b&&(0,t.BX)(p.k,{align:"center",gap:(0,s.h)(8),children:[(0,t.tZ)(c.x,{children:(0,t.tZ)("img",{loading:"lazy",src:"/svg/price-outline.svg",style:{width:(0,s.h)(20),display:"block"},alt:"Price"})}),(0,t.BX)(n.T,{size:"p4",color:"green.6",weight:"semiBold",children:[Intl.NumberFormat(d).format(parseInt(b))," ",f]}),x&&(0,t.BX)(n.T,{size:"p4",color:"gray.4",weight:"semiBold",sx:{textDecoration:"line-through"},children:[Intl.NumberFormat(d).format(parseInt(x))," ",f]})]}),v.length>0&&(0,t.BX)(p.k,{align:"flex-start",gap:(0,s.h)(8),children:[(0,t.tZ)(c.x,{children:(0,t.tZ)(H.Z,{size:20})}),(0,t.tZ)(n.T,{size:"p4",children:v.join(", ")})]}),u&&(0,t.BX)(p.k,{align:"flex-start",gap:(0,s.h)(8),children:[(0,t.tZ)(c.x,{children:(0,t.tZ)(O.Z,{size:20})}),(0,t.tZ)(n.T,{size:"p4",children:u})]}),Z&&(0,t.BX)(p.k,{align:"flex-start",gap:(0,s.h)(8),children:[(0,t.tZ)(c.x,{children:(0,t.tZ)("img",{loading:"lazy",src:"/svg/location-outline.svg",style:{width:(0,s.h)(20),display:"block"},alt:"Price"})}),(0,t.tZ)(n.T,{size:"p4",children:Z})]})]})]})})};var F=a("fdQd"),j=a("Iblh"),V=a("IDes");let G=(0,_.k)(e=>({root:{},popoperDropdown:{padding:(0,s.h)(8),border:0,backgroundColor:e.colors.gray[8]},popoperArrow:{backgroundColor:e.colors.gray[8],borderColor:e.colors.gray[8]},text:{color:"#fff"},email:{color:e.colors.blue[3]}})),PromotionTag=e=>{var i,a,o,r;let{label:l,color:d="blue",textColor:h,styles:p,className:m,classNames:g,hasTooltip:v}=e,{formatMessage:u}=(0,f.Z)(),b=(0,T.d)(),[x,{close:Z,open:w}]=(0,j.q)(!1),{classes:y,theme:C,cx:k}=G(void 0,{name:"PromotionTag",styles:p,classNames:g}),B=h||(null===(a=C.colors)||void 0===a?void 0:null===(i=a[d])||void 0===i?void 0:i[6]),E=(0,t.tZ)(c.x,{className:k(y.root,m),sx:{background:d.startsWith("#")?d:null===(r=C.colors)||void 0===r?void 0:null===(o=r[d])||void 0===o?void 0:o[0],borderRadius:(0,s.h)(4),padding:"5px 12px 5px 4px"},children:(0,t.BX)(n.T,{size:"p4",color:B,sx:{display:"flex",gap:(0,s.h)(4),".icon":{marginTop:(0,s.h)(2)}},children:[(0,t.tZ)(V.Z,{size:16,color:B,className:"icon"}),(0,t.tZ)("span",{children:l})]})});return!b&&(b||v)?(0,t.BX)(F.o,{withArrow:!0,shadow:"md",opened:x,width:300,classNames:{dropdown:y.popoperDropdown,arrow:y.popoperArrow},children:[(0,t.tZ)(F.o.Target,{children:(0,t.tZ)(c.x,{onMouseEnter:w,onMouseLeave:Z,sx:{cursor:"pointer"},children:E})}),(0,t.tZ)(F.o.Dropdown,{onMouseEnter:w,onMouseLeave:Z,children:(0,t.tZ)(n.T,{size:"p4",className:y.text,children:u({id:"doctorCard.promotionTag.popoverContent",defaultMessage:"Vui l\xf2ng li\xean hệ hotline 02871096118 hoặc email {email} để nhận ngay voucher ưu đ\xe3i."},{email:(0,t.tZ)(c.x,{component:"a",className:y.email,href:"mailto:Hotro@hellobacsi.com",children:"Hotro@hellobacsi.com"})})})})]}):E};var q=a("CJtR");let DoctorCard=e=>{let{item:i,className:a,classNames:r,display:l="vertical",styles:d,isService:m,hidePrice:g,showConfirmCityPopup:v=!1,onCancel:u,showPromotionEvent:b,campaign:x={name:"",source:""},...Z}=e,{validOutpatient:w,validTelemedicine:y,rating:C,slug:k,id:B,cityName:T}=i,{formatMessage:R}=(0,f.Z)(),{locale:I}=(0,D.h)(),{classes:X,cx:_}=L({display:l},{name:"DoctorCard",classNames:r,styles:d}),P=Math.floor(Number(C)),[H,O]=(0,o.useState)(null),F={doctor:{...i,..."wide-horizon"===l&&{validOutpatient:!1,validTelemedicine:!1}},ratio:"vertical"===l||"wide-horizon"===l?1.5:1,className:X.avatar},j=P>0?(0,t.BX)(p.k,{gap:(0,s.h)(8),align:"center",children:[(0,t.tZ)(M.i,{defaultValue:P,readOnly:!0}),(0,t.BX)(n.T,{size:"s4",weight:"semiBold",children:[parseFloat(C),"/5"]})]}):null,V=(0,o.useMemo)(()=>{var e;let i="".concat((0,q.UC)(I),"/care/").concat(null===(e=N.a8[I])||void 0===e?void 0:e[m?"SERVICE":"DOCTOR"],"/").concat(k,"-").concat(B,"/"),a=new URL(i);return x.name&&a.searchParams.append("utm_campaign",x.name),x.source&&a.searchParams.append("utm_source",x.source),a.toString()},[]),G={"data-event-category":"Service Connection","data-event-action":"Book Doctor","data-event-label":"https://".concat(E.domainLocales[I]).concat(V)},handleClick=e=>{v?(e.preventDefault(),O({cityName:T,url:V})):window.open(V)},U={href:V,target:"_blank",style:{display:"block",borderRadius:"inherit"},className:"pointer-event-child-none",onClick:handleClick,...G},Y=(0,t.tZ)(A.B,{size:"vertical"===l?"md":"sm",className:X.btn,onClick:handleClick,...G,children:R(m?{id:"articlePage.careEmbedding.bookService"}:{id:"articleAuthor.button",defaultMessage:"Book now"})}),K=(0,t.BX)(t.HY,{children:[(0,t.tZ)(PromotionTag,{color:"yellow",textColor:"yellow.9",hasTooltip:!0,label:(0,t.tZ)(t.HY,{children:R({id:"doctorCard.promotionTag.canUseVoucher",defaultMessage:"C\xf3 thể \xe1p dụng voucher"})})}),(0,t.tZ)(PromotionTag,{color:"#FDF1F6",textColor:"#A50064",label:(0,t.tZ)(t.HY,{children:R({id:"doctorCard.promotionTag.discount",defaultMessage:"Thẻ qu\xe0 tặng giảm th\xeam {price}"},{price:(0,t.tZ)("strong",{children:"100.000 đ"})})})}),(0,t.tZ)(PromotionTag,{color:"#FDF1F6",textColor:"#A50064",label:(0,t.tZ)(t.HY,{children:R({id:"doctorCard.promotionTag.discount1",defaultMessage:"Cơ hội nhận qu\xe0 trị gi\xe1 {price}"},{price:(0,t.tZ)("strong",{children:"300.000 đ"})})})})]});return(0,t.BX)(t.HY,{children:[(0,t.tZ)(c.x,{className:_(X.root,a),...Z,children:"vertical"===l?(0,t.BX)(t.HY,{children:[(0,t.BX)(c.x,{sx:{borderRadius:"inherit"},children:[(0,t.tZ)("a",{...U,children:(0,t.tZ)(DoctorAvatar,{...F})}),(0,t.tZ)(Info,{className:X.info,item:i,hidePrice:g,hrefProps:U})]}),(0,t.BX)(h.K,{spacing:(0,s.h)(16),sx:{padding:"0 ".concat((0,s.h)(16)," ").concat((0,s.h)(12))},children:[b&&(0,t.tZ)(h.K,{spacing:(0,s.h)(4),align:"flex-start",sx:e=>({[e.fn.smallerThan("sm")]:{alignItems:"stretch"}}),children:K}),Y]})]}):"wide-horizon"===l?(0,t.BX)(t.HY,{children:[(0,t.tZ)("a",{...U,style:{display:"block",borderRadius:"inherit"},children:(0,t.tZ)(DoctorAvatar,{...F,sx:{width:(0,s.h)(360)}})}),(0,t.BX)(h.K,{justify:"space-between",sx:{padding:(0,s.h)(24),width:"calc(100% - ".concat((0,s.h)(360),")")},children:[(0,t.BX)(p.k,{align:"flex-start",justify:"space-between",children:[(0,t.tZ)(Info,{hideRating:!0,hidePrice:g,item:i,hrefProps:U}),j]}),(0,t.BX)(p.k,{justify:"space-between",sx:()=>({position:"relative",paddingTop:(0,s.h)(24)}),children:[(0,t.tZ)(Tags,{hasOutpatient:w,hasTelemedicine:y}),Y,b&&(0,t.tZ)(h.K,{align:"flex-end",spacing:(0,s.h)(8),sx:{position:"absolute",right:0,bottom:0},children:K})]})]})]}):(0,t.BX)(t.HY,{children:[(0,t.tZ)("a",{...U,style:{display:"block",borderRadius:"inherit"},children:(0,t.tZ)(DoctorAvatar,{...F})}),(0,t.BX)(h.K,{justify:"space-between",sx:{padding:(0,s.h)(24)},children:[(0,t.tZ)(Info,{item:i,hidePrice:g}),(0,t.tZ)(c.x,{sx:{width:"100%"},children:Y})]})]})}),v&&(0,t.tZ)(z.M,{size:(0,s.h)(408),target:N.Hh,opened:!!H,withCloseButton:!0,styles:e=>({header:{position:"absolute",right:0,top:0,border:0,paddingLeft:0},body:{padding:0},heading:{[e.fn.smallerThan("sm")]:{}}}),onClose:()=>O(null),children:(0,t.BX)(h.K,{sx:e=>({padding:(0,s.h)(16),gap:(0,s.h)(16),[e.fn.largerThan("sm")]:{padding:(0,s.h)(32),gap:(0,s.h)(32)}}),children:[(0,t.BX)(h.K,{spacing:8,sx:{textAlign:"center"},children:[(0,t.tZ)(S.H,{tag:"h4",children:R({id:"doctorCard.confirmCityPopup.heading"})}),(0,t.tZ)(n.T,{size:"p2",children:R({id:"doctorCard.confirmCityPopup.content"},{location:(0,t.tZ)("strong",{children:null==H?void 0:H.cityName})})})]}),(0,t.BX)(p.k,{gap:12,sx:{button:{flex:1}},children:[(0,t.tZ)(A.B,{variant:"tertiary",onClick:()=>{O(null),null==u||u()},children:R({id:"carePathDoctorList.confirmLocModal.cancel"})}),(0,t.tZ)(A.B,{onClick:()=>{(null==H?void 0:H.url)&&window.open(null==H?void 0:H.url),O(null)},children:R({id:"confirm"})})]})]})})]})},HalfCircle=e=>{let{color:i,...a}=e;return(0,t.tZ)("svg",{width:"204",height:"132",viewBox:"0 0 204 132",fill:"none",...a,children:(0,t.tZ)("path",{d:"M131 0.54982L0 0.549797L-2.29048e-05 131.55C-3.55404e-05 203.817 58.6115 262.55 131 262.55C203.267 262.55 262 203.938 262 131.55C261.879 59.1614 203.268 0.549833 131 0.54982Z",fill:i})})};var U=(0,_.k)(()=>({heading:{},filterInput:{},cardWrapper:{padding:(0,s.h)(4),minWidth:(0,s.h)(264),alignItems:"stretch"},listing:{}}));let Shape=e=>{let{color:i,...a}=e;return(0,t.tZ)("svg",{width:"122",height:"122",viewBox:"0 0 122 122",fill:"none",...a,children:(0,t.tZ)("path",{d:"M61 0H122V61C122 94.6513 94.7076 122 61 122C27.3487 122 0 94.7076 0 61C0.0562668 27.2924 27.3487 0 61 0Z",fill:i})})},ViewAllBtn=e=>{let{...i}=e,{formatMessage:a}=(0,f.Z)();return(0,t.tZ)("a",{target:"_blank",...i,children:(0,t.tZ)(A.B,{variant:"white",sx:()=>({width:"100%",backgroundColor:"#fff"}),children:a({id:"categoryPage.seeAll"})})})},formatProps=(e,i)=>{var a,t;return"top_service"===i?{name:e.name,validOutpatient:!1,validTelemedicine:!1,rating:e.hospital.rating||"",doctorSpecialties:[],hospital:e.hospital.name||"",slug:e.slug,id:e.id,avatar:e.image||"",price:e.price||"",priceUnit:e.priceUnit||"",originalPrice:e.originalPrice||"",cityName:(null===(a=e.hospital.city)||void 0===a?void 0:a.name)||""}:{name:e.name,validOutpatient:e.validOutpatient,validTelemedicine:e.validTelemedicine,rating:e.rating,doctorSpecialties:e.doctorSpecialties,hospital:e.hospital.name||"",slug:e.slug,id:e.id,avatar:e.avatar,price:e.price||"",priceUnit:e.priceUnit||"",originalPrice:e.originalPrice||"",cityName:(null===(t=e.hospital.city)||void 0===t?void 0:t.name)||""}},Y={[r.L.Vietnam]:"tat-ca",[r.L.Indonesia]:"semua"};var K=(0,o.forwardRef)((e,i)=>{let{defaultColor:a,sessionProps:r,hidePrice:g,hideViewAll:u,hideBgPattern:S,listingAll:A=[],selectedFilterId:z,filterColor:M,styles:R,showConfirmCityPopup:I,viewAllUrl:X,layoutConfig:_,showPromotionEvent:P,carouselListProps:L,applyH1:H,campaign:O,...F}=e,{formatMessage:j}=(0,f.Z)(),{locale:V}=(0,D.h)(),{classes:G}=U(void 0,{name:"CarePathDoctorList",styles:R}),[q,K]=(0,o.useState)([]),[W,Q]=(0,o.useState)(null),[J,$]=(0,o.useState)([]),{title:ee,description:ei,typeEmbedding:ea,embebIds:et,backgroundColor:eo}=r,en=eo||a,er=(0,d.rZ)(),el=(0,T.d)(),ed=(0,o.useMemo)(()=>"top_service"===ea,[ea]),[ec,es]=(0,o.useState)(!1),eh=(0,m.O)(()=>es(!1));(0,o.useImperativeHandle)(i,()=>({setSelectedFilterId:e=>Q(e)})),(0,o.useEffect)(()=>{ed&&(async()=>{var e,i;let a=await (0,x.d)(w.y.CARE.GET_TOP_SERVICES,{params:{showDistrict:1,categoryIds:et.join(",")}},"care");K(v()(((null==a?void 0:null===(i=a._data)||void 0===i?void 0:null===(e=i.top_services)||void 0===e?void 0:e.city_list)||[]).map(e=>{var i,a;return{group:{id:(null===(i=e.city)||void 0===i?void 0:i.id)||"",name:(null===(a=e.city)||void 0===a?void 0:a.name)||""},doctors:b()(v()((0,Z.PE)(e).serviceList.map(e=>e.services)),["position"],"asc")}})))})()},[]),(0,o.useEffect)(()=>{ed&&z&&Q(z)},[z]),(0,o.useEffect)(()=>{null===W||"all"===W?$(A):$(v()(q.filter(e=>{var i;return(null===(i=e.group)||void 0===i?void 0:i.id)==W}).map(e=>e.doctors)))},[W]);let viewAllByType=e=>{var i;return"/care/".concat((null==Y?void 0:Y[V])||"all","/").concat(null===(i=N.a8[V])||void 0===i?void 0:i["top_service"===ea?"SERVICE":"DOCTOR"],"/").concat(e?"?specialtyId=".concat(e):"")},ep=X||"https://".concat(E.domainLocales[V]).concat("specialties"===ea&&1===et.length?viewAllByType(null==et?void 0:et[0]):viewAllByType()),em={href:ep,target:"_blank","data-event-category":"Service Connection","data-event-action":"View All Doctor Click","data-event-label":ep},eg={1:"wide-horizon",2:"horizon"},ev=el?"vertical":(null==_?void 0:_[J.length])||(null==eg?void 0:eg[J.length])||"vertical",eu={className:"item",isService:"top_service"===ea,hidePrice:g,display:ev,showPromotionEvent:P,showConfirmCityPopup:I&&("all"===W||null===W),campaign:O,onCancel:()=>es(!0)},eb=(0,o.useMemo)(()=>[{label:j({id:"keyword.all"}),value:"all"},...q.map(e=>{var i,a;return{label:null===(i=e.group)||void 0===i?void 0:i.name,value:String(null===(a=e.group)||void 0===a?void 0:a.id)}})],[q]),ef=(0,o.useMemo)(()=>{let e={};return eb.map(i=>{i.value&&(e[i.value]=i.label||"")}),e},[q]);return J.length>0?(0,t.BX)(c.x,{sx:e=>({position:"relative",background:en,overflow:"hidden",[e.fn.smallerThan("sm")]:{".desktop-btn":{display:"none"}},[e.fn.largerThan("sm")]:{".mobile-btn":{display:"none"}}}),...F,children:[!S&&(0,t.BX)(t.HY,{children:[(0,t.tZ)(c.x,{sx:{position:"absolute",left:0,top:0},children:(0,t.tZ)(Circle,{color:er.fn.darken(en,.08)})}),(0,t.BX)(c.x,{sx:{position:"absolute",right:0,bottom:0},children:[(0,t.tZ)(HalfCircle,{color:er.fn.lighten(en,.08)}),(0,t.tZ)(c.x,{sx:{position:"absolute",left:(0,s.h)(44),top:0,transform:"translate(0, -75%)"},children:(0,t.tZ)(Shape,{color:er.fn.darken(en,.08)})})]})]}),(0,t.tZ)(y.W,{style:{position:"relative"},children:(0,t.BX)(h.K,{sx:e=>({padding:"".concat((0,s.h)(24)," 0"),gap:(0,s.h)(24),[e.fn.largerThan("sm")]:{padding:"".concat((0,s.h)(40)," 0"),gap:(0,s.h)(40)}}),children:[(0,t.BX)(p.k,{justify:"space-between",sx:e=>({[e.fn.smallerThan("sm")]:{flexDirection:"column",gap:(0,s.h)(8)}}),children:[(0,t.BX)(h.K,{sx:e=>({gap:(0,s.h)(8),[e.fn.largerThan("sm")]:{gap:(0,s.h)(12)}}),children:[ee&&(0,t.tZ)(n.T,{size:"h2",as:H?"h1":"h2",color:"#fff",className:G.heading,children:ee}),ei&&(0,t.tZ)(n.T,{size:"s3",color:"#fff",weight:"semiBold",children:ei})]}),ed?(0,t.BX)(c.x,{ref:eh,sx:{position:"relative",userSelect:"none"},children:[(0,t.BX)(p.k,{className:G.filterInput,align:"center",justify:"space-between",onClick:()=>es(!ec),sx:e=>({padding:"".concat((0,s.h)(10)," ").concat((0,s.h)(12)),backgroundColor:"#fff",borderRadius:(0,s.h)(4),border:"1px solid ".concat(e.colors.neutral[2]),cursor:"pointer",width:(0,s.h)(250),...M&&{backgroundColor:M,color:"#fff"},[e.fn.smallerThan("sm")]:{width:"100%"}}),children:[(0,t.BX)(p.k,{gap:(0,s.h)(8),align:"center",children:[(0,t.tZ)(k.Z,{size:18,color:M?"#fff":er.colors.neutral[4]}),(0,t.tZ)(c.x,{sx:{fontSize:(0,s.h)(14),lineHeight:(0,s.h)(18),...!W&&{color:M?"#fff":er.colors.neutral[7]},...M&&{fontWeight:600}},children:W?ef[W]:j({id:"carePathDoctorList.filter.placeholder"})})]}),(0,t.tZ)(C.Z,{size:18,color:M?"#fff":void 0})]}),(0,t.tZ)(c.x,{sx:e=>({display:ec?"block":"none",position:"absolute",top:(0,s.h)(45),width:"100%",background:"#fff",border:"1px solid ".concat(e.colors.gray[1]),borderRadius:(0,s.h)(4),zIndex:1,padding:(0,s.h)(2),boxShadow:"1px 1px 4px 1px rgba(0,0,0,0.05)"}),children:(0,t.tZ)(h.K,{spacing:0,children:eb.map((e,i)=>{let a=e.value===W;return(0,t.BX)(p.k,{justify:"space-between",sx:e=>({padding:"".concat((0,s.h)(8)," ").concat((0,s.h)(16)),"&:hover":{background:e.colors.gray[1]},...a?{"&,&:hover":{backgroundColor:"#d5f1f1"}}:{cursor:"pointer"}}),onClick:()=>{Q(e.value),es(!1)},children:[(0,t.tZ)(n.T,{size:el?"p3":"p4",children:e.label}),a&&(0,t.tZ)(l.Z,{size:18,color:M})]},String(i))})})})]}):u?null:(0,t.tZ)(ViewAllBtn,{...em,className:"desktop-btn"})]}),(0,t.tZ)(B.jx,{showFullSlide:!el,lengthToCarouselDesktop:5,gapDesktop:20,gapMobile:20,...L,children:(0,t.tZ)(B.jx.Slider,{classNames:{listing:G.listing},children:J.map((e,i)=>(0,t.tZ)(c.x,{className:G.cardWrapper,sx:{width:"100%"},children:(0,t.tZ)(DoctorCard,{...eu,item:formatProps(e,ea),sx:{height:"100%"}})},String(i)))})}),!ed&&!u&&(0,t.tZ)(ViewAllBtn,{...em,className:"mobile-btn"})]})})]}):null})},hhen:function(e,i,a){a.d(i,{f:function(){return CarePathProductWidgets}});var t=a("BGKE"),o=a("wp0n"),n=a("Eso5"),r=a("gHFm"),l=a("hXNO"),d=a("/npG"),c=a("mYVa"),s=(0,d.k)((e,i)=>{let{bgColor:a,productNumber:t}=i;return{root:{backgroundColor:a||e.colors.blue[0],paddingTop:(0,c.h)(80),paddingBottom:(0,c.h)(80),[e.fn.smallerThan("sm")]:{paddingTop:(0,c.h)(32),paddingBottom:(0,c.h)(32)}},inner:{display:"flex",flexDirection:"column",gap:(0,c.h)(16),[e.fn.largerThan("sm")]:{gap:(0,c.h)(40)}},heading:{color:"#fff"},widgets:{[e.fn.largerThan("sm")]:{...1===t?{background:"#fff"}:{padding:0,background:"transparent"}},[e.fn.smallerThan("sm")]:{background:"transparent",margin:"0 -16px"}},cardRoot:{[e.fn.largerThan("sm")]:{...2===t?{padding:(0,c.h)(16)}:{}}},cardThumbnail:{[e.fn.largerThan("sm")]:{...2===t?{width:(0,c.h)(164)}:{}}},progressBar:{},progressRoot:{background:"rgba(255,255,255,0.5)"}}}),h=a("yioo");let CarePathProductWidgets=e=>{let{title:i,products:a=[],styles:d,classNames:c,className:p,bgColor:m,applyH1:g}=e,v=(0,l.d)(),u=a.length,{classes:b,cx:f}=s({bgColor:m,productNumber:u},{name:"CarePathProductWidgets",styles:d,classNames:c});return a.length>0?(0,t.tZ)(n.x,{className:f(b.root,p),children:(0,t.tZ)(r.W,{children:(0,t.BX)(n.x,{className:b.inner,children:[i&&(0,t.tZ)(o.T,{size:"h2",as:g?"h1":"h3",className:b.heading,children:i}),(0,t.tZ)(h.ProductsWidget,{products:a,numberItemToSlideDesktop:6,numberItemToSlideMobile:2,cartBtnColor:m,layout:v?Array(u).fill("wide-horizon"):["wide-horizon","wide-horizon","horizon","vertical"],classNames:{root:b.widgets,progressBar:b.progressBar,progressRoot:b.progressRoot,cardRoot:b.cardRoot}})]})})}):null}},"/lrZ":function(e,i,a){a.d(i,{O:function(){return CarePathSelection}});var t=a("BGKE"),o=a("nGnw"),n=a("wp0n"),r=a("mYVa"),l=a("Eso5"),d=a("OAL+"),c=a("0Tuv"),s=a("gHFm"),h=a("eO6u"),p=a("raAP"),m=a("hXNO"),g=a("/npG"),v=(0,g.k)((e,i)=>{let{unsetRatio:a,detectPage:{isSimilac:t}}=i,o=e.colors;return{root:{},container:{},wrapper:{gap:(0,r.h)(32),padding:"".concat((0,r.h)(24)," 0"),[e.fn.largerThan("sm")]:{gap:(0,r.h)(64),padding:(0,r.h)(80)}},heading:{},description:{color:e.colors.gray[8]},bannerImg:{[e.fn.largerThan("sm")]:{maxWidth:(0,r.h)(744)}},optionList:{display:"flex",[e.fn.smallerThan("sm")]:{flexDirection:"column",width:"100%",gap:(0,r.h)(12)},[e.fn.largerThan("sm")]:{justifyContent:"center",gap:(0,r.h)(24),".item":{width:(0,r.h)(264)}}},radioOptionRoot:{...t&&{backgroundColor:"#fff"},...!a&&{borderRadius:(0,r.h)(16),border:"2px solid transparent",boxShadow:"0px 0px 1px 0px rgba(0, 0, 0, 0.04), 0px 2px 8px 0px rgba(0, 0, 0, 0.04), 0px 16px 24px 0px rgba(0, 0, 0, 0.06)",transition:"all .1s ease",'&[data-checked="true"]':{borderColor:e.fn.primaryColor(),backgroundColor:o[e.primaryColor][0]}}},radioOptionLabel:{padding:0,cursor:"pointer"},radioOptionLabelWrapper:{width:"100%"},radioOptionInner:{display:"none"},optionRoot:{},optionWrapper:{},optionThumbnail:{},optionHeading:{}}});a("q1tI");var u=a("RZSM"),b=(0,g.k)(e=>({root:{},wrapper:{display:"flex",[e.fn.smallerThan("sm")]:{alignItems:"center",padding:(0,r.h)(8),gap:(0,r.h)(16),img:{width:(0,r.h)(48)}},[e.fn.largerThan("sm")]:{flexDirection:"column",alignItems:"center",padding:"".concat((0,r.h)(12)," ").concat((0,r.h)(12)," ").concat((0,r.h)(24)),gap:(0,r.h)(24)}},thumbnail:{borderRadius:(0,r.h)(16),[e.fn.smallerThan("sm")]:{width:(0,r.h)(120)}},heading:{textAlign:"center"}}));let CarePathOption=e=>{let{label:i,icon:a,className:o,classNames:r,styles:d,...c}=e,{classes:s,cx:h}=b(void 0,{name:"CarePathSelection__Option",styles:d,classNames:r});return(0,t.tZ)(l.x,{className:h(o,s.root),...c,children:(0,t.BX)(l.x,{className:s.wrapper,children:[(0,t.tZ)(u.o,{className:s.thumbnail,ratio:1.5,w:"100%",variant:"",children:(0,t.tZ)("img",{src:"".concat(a,"?w=300&q=90"),style:{borderRadius:"inherit"},alt:"",loading:"lazy"})}),(0,t.tZ)(n.T,{className:s.heading,size:"s3",weight:"semiBold",children:i})]})})};var f=a("DslX");let CarePathSelection=e=>{let{heading:i,description:a,unsetRatio:g,useCommonAssess:u,assessFolderName:b,options:x,onSelect:Z,keyID:w="",styles:y,classNames:C,className:k}=e,B=(0,p.U)(),E=(0,f.d)(w),{isNestle:T,isSimilac:D,isVinamilk:N}=E||{},S=(0,m.d)(),{classes:A,cx:z}=v({unsetRatio:g,detectPage:E},{name:"CarePathSelection",styles:y,classNames:C});return(0,t.tZ)(h.Yr,{className:"service-connection-page",style:{minHeight:(0,r.h)(610),marginBottom:0,...D&&{backgroundColor:"#E6FAF7"},...N&&{backgroundColor:"#CFFEC8",backgroundImage:"url(".concat(o.C.getAssetPath("vinamilk/selection-bg.png"),")")}},children:(0,t.tZ)(l.x,{className:z(A.root,k),children:(0,t.tZ)(s.W,{className:A.container,children:(0,t.BX)(d.K,{className:A.wrapper,align:"stretch",children:[T?(0,t.tZ)(t.HY,{children:(0,t.tZ)(l.x,{sx:{textAlign:"center"},children:(0,t.tZ)("img",{src:o.C.getAssetPath(S?"nestle/selection_banner_mobile.png":"nestle/selection_banner_desktop.png"),loading:"lazy",alt:"Nestle",className:A.bannerImg})})}):(0,t.tZ)(t.HY,{children:(i||a)&&(0,t.BX)(d.K,{spacing:(0,r.h)(8),align:"center",sx:{textAlign:"center"},children:[i&&(0,t.tZ)(n.T,{size:"h1",className:A.heading,as:"div",children:(0,t.tZ)("h1",{dangerouslySetInnerHTML:{__html:i}})}),a&&(0,t.tZ)(n.T,{size:"p3",className:A.description,as:"div",children:(0,t.tZ)("div",{dangerouslySetInnerHTML:{__html:a}})})]})}),(0,t.tZ)(c.Y.Group,{unstyled:!0,onChange:e=>{null==Z||Z(x.filter(i=>i.groupId===e)[0]||{})},children:(0,t.tZ)(l.x,{className:A.optionList,children:x.map((e,i)=>(0,t.tZ)(c.Y,{classNames:{root:A.radioOptionRoot,label:A.radioOptionLabel,labelWrapper:A.radioOptionLabelWrapper,inner:A.radioOptionInner},value:e.groupId,label:g?(0,t.tZ)(l.x,{"data-event-category":"Service Connection","data-event-action":"Select Audience","data-event-label":B,"data-event-audience":e.label,className:"item pointer-event-child-none",children:(0,t.tZ)("img",{src:u?o.C.getAssetPath(S?"".concat(b,"/option").concat(i+1,"_mobile.png"):"".concat(b,"/option").concat(i+1,".png")):e.icon,loading:"lazy",alt:e.label})}):(0,t.tZ)(CarePathOption,{"data-event-category":"Service Connection","data-event-action":"Select Audience","data-event-label":B,"data-event-audience":e.label,className:"item pointer-event-child-none",classNames:{root:A.optionRoot,wrapper:A.optionWrapper,thumbnail:A.optionThumbnail,heading:A.optionHeading},...e},String(i))},String(i)))})})]})})})})}}}]);