"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 r},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("3wcI"),l=a("/jx/");let r=(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)(l.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"),l=a("q1tI"),r=a("09QT"),d=a("/tR3"),c=a("oQBk"),s=a("hZTu"),h=a("2yqS"),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:r,type:d}=e,{locale:c}=(0,g.h)(),{formatMessage:u}=(0,p.Z)(),b=(0,l.useMemo)(()=>(0,m.UC)(c),[c]),f=(0,m.zs)({type:d,searchSlug:r,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("Q9az"),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,r;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,"^^"),N=(0,l.useMemo)(()=>(0,m.UC)(B),[B]),D=(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:D,children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Doctor Detail Click",dataEventLabel:"".concat(T).concat(N).concat(x.sb).concat(D),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(N).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===(r=d.hospital)||void 0===r?void 0:r.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,r;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),N="^".concat(d.id,"^^"),D=(0,l.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}),z=(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(N).concat(D).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===(r=d.hospital)||void 0===r?void 0:r.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(N).concat(k),children:y({id:"careBooking.bookAnAppointment",defaultMessage:"Book an appointment"})}),(0,n.tZ)("a",{href:z,children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Doctor Detail Click",dataEventLabel:"".concat(N).concat(D).concat(x.sb).concat(z),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,l.useState)([]),[x,Z]=(0,l.useState)(""),w=(0,l.useCallback)(async()=>{var e,a;let o=await (0,r.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))||[],l=n.slice(0,4);f(l),u&&u(l,i)},[u]),y=(0,l.useCallback)(async()=>{let e=await (0,r.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,l.useEffect)(()=>{w(),y()},[]);let C=(0,l.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,[l]=(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(l.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(l.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:l}=(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,l,d;let s=await (0,r.d)(c.y.CARE.GET_HOSPITAL_DETAIL,{params:{id:i.id}},"care"),p=s._data.branch,m=await (0,r.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===(l=g[0].hospital_branch)||void 0===l?void 0:l.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:l,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:l,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:l,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:l,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:l,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,l.useState)([]),[x,Z]=(0,l.useState)(""),w=(0,l.useCallback)(async()=>{var e,a;let o=await (0,r.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))||[],l=n.slice(0,4);f(l),u&&u(l,i)},[u]),y=(0,l.useCallback)(async()=>{let e=await (0,r.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,l.useEffect)(()=>{w(),y()},[]);let C=(0,l.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("/jx/"),careEmbedRecommendation_OneItemCareServiceRecommendation=e=>{var i,a,t,o,r;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,"^"),N=(0,l.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)},D=(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=D};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(N).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===(r=d.hospital)||void 0===r?void 0:r.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,r;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),N="^^".concat(d.serviceId,"^"),D=(0,l.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}),z=(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(N).concat(D).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===(r=d.hospital)||void 0===r?void 0:r.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(N).concat(k),children:y({id:"articlePage.careEmbedding.bookService",defaultMessage:"Book Service"})}),(0,n.tZ)("a",{href:z,children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Service Detail Click",dataEventLabel:"".concat(N).concat(D).concat(x.sb).concat(z),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,l.useState)([]),[x,Z]=(0,l.useState)(""),w=(0,l.useCallback)(async()=>{var e,a;let o=await (0,r.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))||[],l=n.slice(0,4);f(l),u&&u(l,i)},[u]),y=(0,l.useCallback)(async()=>{let e=await (0,r.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,l.useEffect)(()=>{w(),y()},[]);let C=(0,l.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 Q}});var t=a("BGKE"),o=a("q1tI"),n=a("qdzI"),l=a("lsJL"),r=a("m42D"),d=a("8vDj"),c=a("Eso5"),s=a("mYVa"),h=a("OAL+"),p=a("SPK5"),m=a("KeOA"),g=a("0D4Z"),v=a("ChHM"),u=a("TYy9"),b=a.n(u),f=a("xweI"),x=a.n(f),Z=a("dDsW"),w=a("09QT"),y=a("J3uC"),C=a("oQBk"),k=a("gHFm"),B=a("ItJP"),E=a("6Eqi"),T=a("vODv"),N=a("iv2E"),D=a("hXNO"),S=a("P5LW"),z=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 A=a("qEJm"),I=a("/bt/"),R=a("2RS2"),M=a("hEVz"),X=a("RZSM"),_=a("zwQ/"),P=a("xGJE");let Tag=e=>{let{title:i,colorShade:a,icon:l}=e,r=(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(r.colors[c][h]),backgroundColor:r.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(l,{size:16,color:r.colors[c][9]}),(0,t.tZ)(n.T,{size:"n1",children:i})]})},Tags=e=>{let{hasOutpatient:i,hasTelemedicine:a,...o}=e,{formatMessage:n}=(0,Z.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)(_.Z,{}),colorShade:"blue.1"}),a&&(0,t.tZ)(Tag,{title:n({id:"carePathEmbedDoctor.telemedicine",defaultMessage:"Telemedicine"}),icon:(0,t.tZ)(P.Z,{}),colorShade:"orange.1"})]}):null};var L=a("/npG"),O=(0,L.k)(()=>({avatar:{position:"relative",borderTopLeftRadius:"inherit"}}));let DoctorAvatar=e=>{let{doctor:i,ratio:a=1,className:o,classNames:n,styles:l,...r}=e,{classes:d,cx:h}=O(void 0,{name:"DoctorAvatar",classNames:n,styles:l}),{name:p,avatar:m,validTelemedicine:g,validOutpatient:v}=i;return(0,t.BX)(c.x,{className:h(d.avatar,o),...r,children:[(0,t.tZ)(X.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 H=(0,L.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)}}}}),F=a("e6wM"),j=a("mlYt");let Info=e=>{let{item:i,hidePrice:a,hideRating:o,hrefProps:l,...r}=e,{locale:d}=(0,S.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",...r,children:(0,t.BX)(h.K,{spacing:(0,s.h)(8),children:[(0,t.tZ)("a",{...l,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)(F.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)(j.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 q=a("7yNo"),V=a("Iblh"),G=a("IDes");let U=(0,L.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,l;let{label:r,color:d="blue",textColor:h,styles:p,className:m,classNames:g,hasTooltip:v}=e,{formatMessage:u}=(0,Z.Z)(),b=(0,D.d)(),[f,{close:x,open:w}]=(0,V.q)(!1),{classes:y,theme:C,cx:k}=U(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===(l=C.colors)||void 0===l?void 0:null===(o=l[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)(G.Z,{size:16,color:B,className:"icon"}),(0,t.tZ)("span",{children:r})]})});return!b&&(b||v)?(0,t.BX)(q.o,{withArrow:!0,shadow:"md",opened:f,width:300,classNames:{dropdown:y.popoperDropdown,arrow:y.popoperArrow},children:[(0,t.tZ)(q.o.Target,{children:(0,t.tZ)(c.x,{onMouseEnter:w,onMouseLeave:x,sx:{cursor:"pointer"},children:E})}),(0,t.tZ)(q.o.Dropdown,{onMouseEnter:w,onMouseLeave:x,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 W=a("CJtR");let DoctorCard=e=>{let{item:i,className:a,classNames:l,display:r="vertical",styles:d,isService:m,hidePrice:g,showConfirmCityPopup:v=!1,onCancel:u,showPromotionEvent:b,campaign:f={name:"",source:""},...x}=e,{validOutpatient:w,validTelemedicine:y,rating:C,slug:k,id:B,cityName:E}=i,{formatMessage:T}=(0,Z.Z)(),{locale:D}=(0,S.h)(),{classes:X,cx:_}=H({display:r},{name:"DoctorCard",classNames:l,styles:d}),P=Math.floor(Number(C)),[L,O]=(0,o.useState)(null),F={doctor:{...i,..."wide-horizon"===r&&{validOutpatient:!1,validTelemedicine:!1}},ratio:"vertical"===r||"wide-horizon"===r?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,q=(0,o.useMemo)(()=>{var e;let i="".concat((0,W.UC)(D),"/care/").concat(null===(e=z.a8[D])||void 0===e?void 0:e[m?"SERVICE":"DOCTOR"],"/").concat(k,"-").concat(B,"/"),a=new URL(i);return f.name&&a.searchParams.append("utm_campaign",f.name),f.source&&a.searchParams.append("utm_source",f.source),a.toString()},[]),V={"data-event-category":"Service Connection","data-event-action":"Book Doctor","data-event-label":"https://".concat(N.domainLocales[D]).concat(q)},handleClick=e=>{v?(e.preventDefault(),O({cityName:E,url:q})):window.open(q)},G={href:q,target:"_blank",style:{display:"block",borderRadius:"inherit"},className:"pointer-event-child-none",onClick:handleClick,...V},U=(0,t.tZ)(I.B,{size:"vertical"===r?"md":"sm",className:X.btn,onClick:handleClick,...V,children:T(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:T({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:T({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:T({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),...x,children:"vertical"===r?(0,t.BX)(t.HY,{children:[(0,t.BX)(c.x,{sx:{borderRadius:"inherit"},children:[(0,t.tZ)("a",{...G,children:(0,t.tZ)(DoctorAvatar,{...F})}),(0,t.tZ)(Info,{className:X.info,item:i,hidePrice:g,hrefProps:G})]}),(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}),U]})]}):"wide-horizon"===r?(0,t.BX)(t.HY,{children:[(0,t.tZ)("a",{...G,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:G}),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}),U,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",{...G,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:U})]})]})}),v&&(0,t.tZ)(R.M,{size:(0,s.h)(408),target:z.Hh,opened:!!L,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)(A.H,{tag:"h4",children:T({id:"doctorCard.confirmCityPopup.heading"})}),(0,t.tZ)(n.T,{size:"p2",children:T({id:"doctorCard.confirmCityPopup.content"},{location:(0,t.tZ)("strong",{children:null==L?void 0:L.cityName})})})]}),(0,t.BX)(p.k,{gap:12,sx:{button:{flex:1}},children:[(0,t.tZ)(I.B,{variant:"tertiary",onClick:()=>{O(null),null==u||u()},children:T({id:"carePathDoctorList.confirmLocModal.cancel"})}),(0,t.tZ)(I.B,{onClick:()=>{(null==L?void 0:L.url)&&window.open(null==L?void 0:L.url),O(null)},children:T({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 K=(0,L.k)(e=>({heading:{},filterInput:{},cardWrapper:{padding:(0,s.h)(4),minWidth:(0,s.h)(264),alignItems:"stretch"},listing:{},skeletonItem:{height:413,borderRadius:16,[e.fn.smallerThan("sm")]:{display:"none","&:first-child":{display:"block"}}}}));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,Z.Z)();return(0,t.tZ)("a",{target:"_blank",...i,children:(0,t.tZ)(I.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={[l.L.Vietnam]:"tat-ca",[l.L.Indonesia]:"semua"};var Q=(0,o.forwardRef)((e,i)=>{var a;let{defaultColor:l,sessionProps:u,hidePrice:f,hideViewAll:A,hideBgPattern:I,listingAll:R=[],selectedFilterId:M,filterColor:X,styles:_,showConfirmCityPopup:P,viewAllUrl:L,layoutConfig:O,showPromotionEvent:H,carouselListProps:F,applyH1:j,campaign:q,...V}=e,{formatMessage:G}=(0,Z.Z)(),{locale:U}=(0,S.h)(),{classes:W}=K(void 0,{name:"CarePathDoctorList",styles:_}),[Q,J]=(0,o.useState)([]),[$,ee]=(0,o.useState)(null),[ei,ea]=(0,o.useState)(null),{title:et,description:eo,typeEmbedding:en,embebIds:el,backgroundColor:er}=u,ed=er||l,ec=(0,d.rZ)(),es=(0,D.d)(),eh=(0,o.useMemo)(()=>"top_service"===en,[en]),[ep,em]=(0,o.useState)(!1),eg=(0,v.O)(()=>em(!1)),ev=null!==(a=null==ei?void 0:ei.length)&&void 0!==a?a:0;(0,o.useImperativeHandle)(i,()=>({setSelectedFilterId:e=>ee(e)})),(0,o.useEffect)(()=>{eh&&(async()=>{var e,i;let a=await (0,w.d)(C.y.CARE.GET_TOP_SERVICES,{params:{showDistrict:1,categoryIds:el.join(",")}},"care");J(b()(((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:x()(b()((0,y.PE)(e).serviceList.map(e=>e.services)),["position"],"asc")}})))})()},[]),(0,o.useEffect)(()=>{eh&&M&&ee(M)},[M]),(0,o.useEffect)(()=>{null===$||"all"===$?ea(R):ea(b()(Q.filter(e=>{var i;return(null===(i=e.group)||void 0===i?void 0:i.id)==$}).map(e=>e.doctors)))},[$]);let viewAllByType=e=>{var i;return"/care/".concat((null==Y?void 0:Y[U])||"all","/").concat(null===(i=z.a8[U])||void 0===i?void 0:i["top_service"===en?"SERVICE":"DOCTOR"],"/").concat(e?"?specialtyId=".concat(e):"")},eu=L||"https://".concat(N.domainLocales[U]).concat("specialties"===en&&1===el.length?viewAllByType(null==el?void 0:el[0]):viewAllByType()),eb={href:eu,target:"_blank","data-event-category":"Service Connection","data-event-action":"View All Doctor Click","data-event-label":eu},ef={1:"wide-horizon",2:"horizon"},ex=es?"vertical":(null==O?void 0:O[ev])||(null==ef?void 0:ef[ev])||"vertical",eZ={className:"item",isService:"top_service"===en,hidePrice:f,display:ex,showPromotionEvent:H,showConfirmCityPopup:P&&("all"===$||null===$),campaign:q,onCancel:()=>em(!0)},ew=(0,o.useMemo)(()=>[{label:G({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]),ey=(0,o.useMemo)(()=>{let e={};return ew.map(i=>{i.value&&(e[i.value]=i.label||"")}),e},[Q]);return(0,t.BX)(c.x,{sx:e=>({position:"relative",background:ed,overflow:"hidden",[e.fn.smallerThan("sm")]:{".desktop-btn":{display:"none"}},[e.fn.largerThan("sm")]:{".mobile-btn":{display:"none"}}}),...V,children:[!I&&(0,t.BX)(t.HY,{children:[(0,t.tZ)(c.x,{sx:{position:"absolute",left:0,top:0},children:(0,t.tZ)(Circle,{color:ec.fn.darken(ed,.08)})}),(0,t.BX)(c.x,{sx:{position:"absolute",right:0,bottom:0},children:[(0,t.tZ)(HalfCircle,{color:ec.fn.lighten(ed,.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:ec.fn.darken(ed,.08)})})]})]}),(0,t.tZ)(k.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:[et&&(0,t.tZ)(n.T,{size:"h2",as:j?"h1":"h2",color:"#fff",className:W.heading,children:et}),eo&&(0,t.tZ)(n.T,{size:"s3",color:"#fff",weight:"semiBold",children:eo})]}),eh?(0,t.BX)(c.x,{ref:eg,sx:{position:"relative",userSelect:"none"},children:[(0,t.BX)(p.k,{className:W.filterInput,align:"center",justify:"space-between",onClick:()=>em(!ep),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),...X&&{backgroundColor:X,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)(E.Z,{size:18,color:X?"#fff":ec.colors.neutral[4]}),(0,t.tZ)(c.x,{sx:{fontSize:(0,s.h)(14),lineHeight:(0,s.h)(18),...!$&&{color:X?"#fff":ec.colors.neutral[7]},...X&&{fontWeight:600}},children:$?ey[$]:G({id:"carePathDoctorList.filter.placeholder"})})]}),(0,t.tZ)(B.Z,{size:18,color:X?"#fff":void 0})]}),(0,t.tZ)(c.x,{sx:e=>({display:ep?"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:ew.map((e,i)=>{let a=e.value===$;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:()=>{ee(e.value),em(!1)},children:[(0,t.tZ)(n.T,{size:es?"p3":"p4",children:e.label}),a&&(0,t.tZ)(r.Z,{size:18,color:X})]},String(i))})})})]}):A?null:(0,t.tZ)(ViewAllBtn,{...eb,className:"desktop-btn"})]}),(0,t.tZ)(c.x,{sx:{minHeight:413},children:null===ei?(0,t.tZ)(c.x,{children:(0,t.BX)(m.M,{spacing:20,breakpoints:[{minWidth:"sm",cols:1},{minWidth:"md",cols:4}],children:[(0,t.tZ)(g.O,{className:W.skeletonItem}),(0,t.tZ)(g.O,{className:W.skeletonItem}),(0,t.tZ)(g.O,{className:W.skeletonItem}),(0,t.tZ)(g.O,{className:W.skeletonItem})]})}):ei.length>0?(0,t.tZ)(T.jx,{showFullSlide:!es,lengthToCarouselDesktop:5,gapDesktop:20,gapMobile:20,...F,children:(0,t.tZ)(T.jx.Slider,{classNames:{listing:W.listing},children:ei.map((e,i)=>(0,t.tZ)(c.x,{className:W.cardWrapper,sx:{width:"100%"},children:(0,t.tZ)(DoctorCard,{...eZ,item:formatProps(e,en),sx:{height:"100%"}})},String(i)))})}):null}),!eh&&!A&&(0,t.tZ)(ViewAllBtn,{...eb,className:"mobile-btn"})]})})]})})},hhen:function(e,i,a){a.d(i,{f:function(){return CarePathProductWidgets}});var t=a("BGKE"),o=a("qdzI"),n=a("Eso5"),l=a("gHFm"),r=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,r.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)(l.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("v9p6"),n=a("qdzI"),l=a("mYVa"),r=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,l.h)(32),padding:"".concat((0,l.h)(24)," 0"),[e.fn.largerThan("sm")]:{gap:(0,l.h)(64),padding:(0,l.h)(80)}},heading:{},description:{color:e.colors.gray[8]},bannerImg:{[e.fn.largerThan("sm")]:{maxWidth:(0,l.h)(744)}},optionList:{display:"flex",[e.fn.smallerThan("sm")]:{flexDirection:"column",width:"100%",gap:(0,l.h)(12)},[e.fn.largerThan("sm")]:{justifyContent:"center",gap:(0,l.h)(24),".item":{width:(0,l.h)(264)}}},radioOptionRoot:{...t&&{backgroundColor:"#fff"},...!a&&{borderRadius:(0,l.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,l.h)(8),gap:(0,l.h)(16),img:{width:(0,l.h)(48)}},[e.fn.largerThan("sm")]:{flexDirection:"column",alignItems:"center",padding:"".concat((0,l.h)(12)," ").concat((0,l.h)(12)," ").concat((0,l.h)(24)),gap:(0,l.h)(24)}},thumbnail:{borderRadius:(0,l.h)(16),[e.fn.smallerThan("sm")]:{width:(0,l.h)(120)}},heading:{textAlign:"center"}}));let CarePathOption=e=>{let{label:i,icon:a,className:o,classNames:l,styles:d,...c}=e,{classes:s,cx:h}=b(void 0,{name:"CarePathSelection__Option",styles:d,classNames:l});return(0,t.tZ)(r.x,{className:h(o,s.root),...c,children:(0,t.BX)(r.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:N,isVinamilk:D}=E||{},S=(0,m.d)(),{classes:z,cx:A}=v({unsetRatio:g,detectPage:E},{name:"CarePathSelection",styles:y,classNames:C});return(0,t.tZ)(h.Yr,{className:"service-connection-page",style:{minHeight:(0,l.h)(610),marginBottom:0,...N&&{backgroundColor:"#E6FAF7"},...D&&{backgroundColor:"#CFFEC8",backgroundImage:"url(".concat(o.C.getAssetPath("vinamilk/selection-bg.png"),")")}},children:(0,t.tZ)(r.x,{className:A(z.root,k),children:(0,t.tZ)(s.W,{className:z.container,children:(0,t.BX)(d.K,{className:z.wrapper,align:"stretch",children:[T?(0,t.tZ)(t.HY,{children:(0,t.tZ)(r.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:z.bannerImg})})}):(0,t.tZ)(t.HY,{children:(i||a)&&(0,t.BX)(d.K,{spacing:(0,l.h)(8),align:"center",sx:{textAlign:"center"},children:[i&&(0,t.tZ)(n.T,{size:"h1",className:z.heading,as:"div",children:(0,t.tZ)("h1",{dangerouslySetInnerHTML:{__html:i}})}),a&&(0,t.tZ)(n.T,{size:"p3",className:z.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)(r.x,{className:z.optionList,children:x.map((e,i)=>(0,t.tZ)(c.Y,{classNames:{root:z.radioOptionRoot,label:z.radioOptionLabel,labelWrapper:z.radioOptionLabelWrapper,inner:z.radioOptionInner},value:e.groupId,label:g?(0,t.tZ)(r.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:z.optionRoot,wrapper:z.optionWrapper,thumbnail:z.optionThumbnail,heading:z.optionHeading},...e},String(i))},String(i)))})})]})})})})}}}]);