"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7334],{46002:function(e,t,i){var n=i(35944),l=i(70917),a=i(67294);t.Z=e=>{let{rating:t,id:i,...l}=e,r=a.useMemo(()=>"".concat(100*t/5-100,"%"),[t]),c=a.useMemo(()=>"url(#mask_".concat(i,")"),[i]);return(0,n.tZ)("div",{css:o,...l,children:(0,n.BX)("svg",{xmlns:"http://www.w3.org/2000/svg",id:i,children:[(0,n.tZ)("defs",{children:(0,n.tZ)("mask",{id:"mask_".concat(i),children:(0,n.tZ)("rect",{width:"100%",height:"100%",x:r,y:"0",fill:"#fff",rx:"5",ry:"5"})})}),(0,n.tZ)("g",{transform:"translate(-272 -4578) translate(272 4557) translate(0 21)",children:(0,n.tZ)("rect",{fill:"#E3E3E3",width:"100%",height:"100%",rx:"5",ry:"5"})}),(0,n.tZ)("g",{mask:c,children:(0,n.tZ)("rect",{fill:"#1647BA",width:"100%",height:"100%",rx:"5",ry:"5"})})]})})};let o=(0,l.iv)("height:10px;margin-bottom:12px;width:100%;& >svg{height:100%;width:100%;}")},11301:function(e,t,i){i.d(t,{A:function(){return o},m:function(){return a}});var n=i(35944),l=i(67294);function a(e){let{children:t,setActiveIndex:i,closeIcon:a,onClickTabs:o}=e,r=e=>{i(e.currentTarget.id),o&&o(e.currentTarget.id)};return(0,n.BX)(n.HY,{children:[null==t?void 0:t.map((e,t)=>(0,l.cloneElement)(e,{key:t,onClick:r})),a]})}function o(e){let{children:t,activeIndex:i}=e;return(0,n.tZ)(n.HY,{children:t.map(e=>e.props.id===i&&e)})}},45323:function(e,t,i){i.d(t,{Z:function(){return y}});var n=i(35944),l=i(67294),a=i(66455),o=i(34665),r=i(70917),c=i(33463),s=i(38068),d=i(31897),u=i(16956);let p=(0,r.iv)("font-size:11px;line-height:16px;"),h=(0,r.iv)("left:auto;margin-left:10px;");var g=l.memo(function(e){let{passwordTooltipKey:t}=e,[i,o]=(0,l.useState)((0,d.hk)(t)),c=(0,l.useCallback)(e=>{o(!1),(0,d.d8)(t,"false",1)},[]);return i?(0,n.tZ)(s.Z,{externalCss:h,children:(0,n.BX)(a.Flex,{justifyContent:"space-between",css:p,children:["Başka sitede kullandığınız bir şifreyi veya evcil bir hayvanınızın adı gibi \xe7ok bariz bir kelimeyi kullanmayın.",(0,n.tZ)(u.Z,{height:16,width:27,css:(0,r.iv)("margin: -8px 0px 0px 25px; cursor:pointer;"),onClick:c})]})}):null});let m=(e,t,i,n)=>(0,r.iv)("height:48px;",o._Q.tablet,"{height:40px;}border-radius:4px;border:solid 1px\n ",n===e?i?o.wL.blue3:o.wL.brownGrey:t?o.wL.algaeGreen:o.wL.scarlet,";margin-bottom:6px;margin-top:12px;padding:0 15px;position:relative;"),v=(e,t,i,n,l)=>(0,r.iv)("position:absolute;margin-top:",t?"-45px":"0",";background-color:",o.wL.white,";padding:0 5px 0 5px;margin-left:-5px;height:17px;font-size:12px;color:",l===e?n?o.wL.blue3:o.wL.brownGrey:i?o.wL.algaeGreen:o.wL.scarlet,";transition:margin 0.1s ease-in-out;"),x=(0,r.iv)("transition:margin 0.1s ease-in-out;height:48px;width:calc(100% - 45px);font-size:12px;padding-left:0px;margin-left:0;color:",o.wL.black,';letter-spacing:0.5px;background-color:transparent;border:none;input[type="text"]:disabled{color:',o.wL.black,';}input[type="password"]:disabled{color:',o.wL.black,";}::placeholder{font-weight:normal;color:",o.wL.black,";}&:focus{outline:none;}&:disabled{color:",o.wL.black,";}",o.I8),f=(0,r.iv)("cursor:pointer;position:absolute;right:15px;");var b=function(e){var t;let[i,r]=l.useState(!1),s=l.useRef(null),[d,u]=l.useState(!1),p=e.value||"",h=""!==e.label,b=d?"text":null!==(t=e.inputType)&&void 0!==t?t:"text",y=(0,l.useMemo)(()=>{var t;return null!==(t=e.value)&&void 0!==t?t:""},[]),w=(0,l.useCallback)(()=>{u(e=>!e)},[]);return(0,n.BX)(n.HY,{children:[(0,n.BX)(a.Flex,{css:[m(e.value,e.valid,i,y),e.containerStyle],flexDirection:"column",justifyContent:"center",onClick:()=>s.current&&s.current.focus(),children:[e.label?(0,n.tZ)("div",{css:[v(e.value,""!==p&&h||i,e.valid,i,y),e.labelStyle],children:e.label}):null,(0,n.tZ)("input",{readOnly:e.disabled,pattern:e.pattern,type:b,ref:s,css:[x,e.inputStyle],placeholder:e.placeholder,value:p,onFocus:t=>[e.onFocus&&e.onFocus(t),r(!0)],onBlur:e=>r(!1),onKeyPress:e.onKeyPress,onKeyDown:e.onKeyDown,onChange:e.onChange}),"password"===e.inputType&&(0,n.tZ)(c.Z,{onClick:w,size:12,color:o.wL.brownGrey3,css:f,children:d?"Gizle":"G\xf6ster"})]}),e.validationMessage&&!e.valid&&(0,n.tZ)(c.Z,{size:"11",mb:"30px",color:o.wL.scarlet,children:e.validationMessage}),"password"===e.inputType&&e.passwordTooltipKey&&(0,n.tZ)(g,{passwordTooltipKey:e.passwordTooltipKey})]})},y=function(e){let[t,i]=l.useState(!0),a=l.useRef(!0),o=l.useCallback(i=>{e.onChange&&e.onChange(i,t)},[e.onChange,t]);function r(t){let i=!1,n=!0,l=!0,a=!0,o=!0;if(e.validation){let r=e.validation;r.required&&(n=void 0!==t&&(null==t?void 0:t.length)>0),r.max&&r.max>0&&(a=void 0!==t&&(null==t?void 0:t.length)<=r.max),r.min&&r.min>0&&(l=void 0!==t&&(null==t?void 0:t.length)>=r.min),r.regex&&(o=void 0===t||r.regex.test(t)),i=n&&a&&l&&o}else i=!0;return i}return(0,l.useEffect)(()=>{a.current?a.current=!1:i(r(e.value))},[e.value,a]),(0,l.useEffect)(()=>{e.showError&&i(r(e.value))},[e.showError]),(0,n.tZ)(b,{disabled:e.disabled,placeholder:e.placeholder,label:e.label,containerStyle:e.containerStyle,pattern:e.pattern,onChange:o,onFocus:e.onFocus,onKeyPress:e.onKeyPress,onKeyDown:e.onKeyDown,inputStyle:e.style,labelStyle:e.labelStyle,value:e.value,valid:t,inputType:e.inputType,validationMessage:e.validationMessage,passwordTooltipKey:e.passwordTooltipKey})}},52642:function(e,t,i){i.d(t,{Z:function(){return m}});var n=i(35944),l=i(70917),a=i(66455),o=i(67294),r=i(33463),c=i(78707),s=i(34665),d=i(69767),u=function(e){let{amenity:t,...i}=e,l=o.useMemo(()=>(0,n.tZ)(c.h,{width:12,height:14,src:"".concat(d.kq,"amenity-icons/group-19-copy-4")}),[]);return(0,n.tZ)("li",{css:p,...i,children:(0,n.BX)(a.Flex,{justifyContent:"space-center",children:[(0,n.tZ)(r.Z,{fontSize:14,css:h,children:null==t?void 0:t.amenityDefaultName}),t.isPaid&&l]})})};let p=(0,l.iv)("margin-top:7px;",s._Q.tablet,"{margin-top:5px;}"),h=(0,l.iv)(s._Q.tablet,"{font-size:12px;}");var g=i(76472),m=function(e){let{subgroup:t,...i}=e,l=o.useMemo(()=>t.amenities.map((e,t)=>(0,n.tZ)(u,{amenity:e},t)),[t]),r=o.useCallback(e=>{let t="room-service-24-px.svg",i=g.q[e];return i&&(t=i),(0,n.tZ)(c.h,{width:15,height:15,src:"".concat(d.kq,"amenity-icons/").concat(t),alt:e})},[]);return(0,n.BX)(a.Box,{...i,css:v,children:[(0,n.BX)(a.Flex,{alignItems:"center",children:[r(t.groupName),(0,n.tZ)("h4",{css:f,children:t.groupName})]}),(0,n.tZ)("ul",{css:x,children:l})]})};let v=(0,l.iv)("margin-top:4px;width:33.333%;padding:5px;&& img{vertical-align:text-bottom;}&& div{display:-webkit-box;}"),x=(0,l.iv)("margin-top:8px;margin-bottom:8px;list-style:none;padding-left:1.5em;"),f=(0,l.iv)("margin:0;margin-left:7px;font-size:14px;font-weight:600;",s._Q.tablet,"{font-size:12px;}")},76472:function(e,t,i){i.d(t,{L:function(){return l},q:function(){return n}});let n={"Genel Tesis \xd6zellikleri":"room-service-24-px-1-copy.svg","Yeme - İ\xe7me":"restaurant-24-px-1-copy.svg","Plaj ve Havuz":"group-72-copy.svg",Aktiviteler:"group-75-copy.svg","\xc7ocuklara \xd6zel":"child-friendly-24-px-1.svg","Yatak Odası":"single-bed-24-px-1-copy.svg",Banyo:"bathtub-24-px.svg",Eğlence:"toys-24-px-copy.svg",Diğer:"done-24-px-copy.svg"},l=e=>{switch(e){case"true":return"Evet";case"false":return"Hayır";default:return e}}},31238:function(e,t,i){i.d(t,{Z:function(){return ep}});var n=i(35944),l=i(70917),a=i(66455),o=i(78707),r=i(96044),c=i(81819),s=i(84657),d=i(16956),u=i(33463),p=i(11526),h=i(69767),g=i(26146),m=i(37935),v=i(33655),x=i(56380),f=i(27484),b=i.n(f),y=i(67294),w=i(31897);let k=e=>{var t,i;let[n,l]=(0,y.useState)([]),[a,o]=(0,y.useState)(e.ratingGroups?e.ratingGroups:[]),[r,c]=(0,y.useState)(),[s,d]=(0,y.useState)(!1),{userPersonal:u,userToken:h,setUserPersonal:f}=(0,y.useContext)(p.S);(0,y.useEffect)(()=>{if(e.fetchInitialData){d(!0);let t="Facility";switch(e.catalogType){case g.H.Poi:case g.H.Place:case g.H.Attraction:t="POI";break;case g.H.Villa:t="Villa"}Promise.all([(0,v.wS)({filter:["ObjectType/Name eq '".concat(t,"'")]}),(0,v.$T)()]).then(e=>{var t,i,n,a,r,c,s,d;200===e[0].status&&!e[0].error&&(null===(i=e[0])||void 0===i?void 0:null===(t=i.body)||void 0===t?void 0:t.value)&&Array.isArray(null===(a=e[0])||void 0===a?void 0:null===(n=a.body)||void 0===n?void 0:n.value)&&o(e[0].body.value.map(e=>({title:e.GroupName,point:0,ref:e}))),200===e[1].status&&!e[1].error&&(null===(c=e[1])||void 0===c?void 0:null===(r=c.body)||void 0===r?void 0:r.value)&&Array.isArray(null===(d=e[1])||void 0===d?void 0:null===(s=d.body)||void 0===s?void 0:s.value)&&l(e[1].body.value.map(e=>({name:e.Name,ref:e})))}).catch(()=>{(0,m.I0)(u.refreshToken).then(e=>e.json()).then(e=>{if(e.success){var t,i,n;(0,w.d8)("phnxUserToken",null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.access_token,7),f({...u,refreshToken:null==e?void 0:null===(i=e.data)||void 0===i?void 0:i.refresh_token}),(0,v.li)(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.access_token)}})}).finally(()=>{d(!1)})}},[e.fetchInitialData]);let k=(0,y.useCallback)(()=>{var t,i,n,l,a,o;return(0,x.Su)({dvc:"desktop",fls:JSON.stringify({plim:6,poff:0,flsp:[{fid:11,flsg:"boundary",v:JSON.stringify({Latitude:null===(t=e.detail)||void 0===t?void 0:t.latitude,Longitude:null===(i=e.detail)||void 0===i?void 0:i.longitude,Distance:10})}]}),poolData:"",queryParams:JSON.stringify({cin:null===(n=e.defaultParams)||void 0===n?void 0:n.checkIn,cout:null===(l=e.defaultParams)||void 0===l?void 0:l.checkOut,act:null===(a=e.defaultParams)||void 0===a?void 0:a.adultCount,cas:null===(o=e.defaultParams)||void 0===o?void 0:o.childAges})},!1).then(e=>{if(200===e.status){var t;c(null===(t=e.body)||void 0===t?void 0:t.catalogs)}})},[null===(t=e.detail)||void 0===t?void 0:t.latitude,null===(i=e.detail)||void 0===i?void 0:i.longitude]),Z=(0,y.useCallback)((t,i)=>{let n={UserId:null==u?void 0:u.userId,ObjectId:e.objectId,Ratings:t.selectedRatingGroups,TravelPurpose:t.selectedTravelPurpose,CommentText:t.comment,Summary:t.commentTitle,AccomondationDate:t.accomondationDate?b()(t.accomondationDate.split("-").reverse().join("-")).add(1,"day").toDate():b()().toDate()};d(!0);let l="facility";switch(e.catalogType){case g.H.Poi:l="poi";break;case g.H.Place:l="place";break;case g.H.Attraction:l="attraction";break;case g.H.Villa:l="villa"}(0,v.Yr)(n,null!=i?i:h,l).then(()=>{t.getNearestLocations?k().finally(()=>{d(!1)}):d(!1)}).catch(()=>{(0,m.I0)(u.refreshToken).then(e=>e.json()).then(e=>{if(e.success){var i,n,l;(0,w.d8)("phnxUserToken",null==e?void 0:null===(i=e.data)||void 0===i?void 0:i.access_token,7),f({...u,refreshToken:null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.refresh_token}),Z(t,null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.access_token)}})})},[h,u,k]);return{travelPurposes:n,ratingGroups:a,isLoading:s,setIsLoading:d,sendSubmitRequest:Z,commentableFacilities:r}};var Z=i(10008),B=i(22149),C=i(94019),L=i(34665);let z=(0,l.iv)("position:relative;"),T=(0,l.iv)("position:absolute;padding:0 5px 0 5px;margin-left:-5px;top:13px;left:15px;"),S=(0,l.iv)("width:100%;height:80px;outline:none;border:0.7px solid ",L.wL.veryLightPink4,";resize:none;padding:13px 15px;font-size:12px;");var D=function(e){let{label:t,setValue:i,value:l,maxLength:o}=e,r=null!=o?o:2e3,c=(0,y.useRef)(null);return(0,y.useEffect)(()=>{(null==l?void 0:l.length)>r&&i(l.substring(0,r))},[l]),(0,n.BX)(a.Box,{css:z,children:[0==l.length&&(0,n.tZ)(u.Z,{onClick:()=>{var e;null==c||null===(e=c.current)||void 0===e||e.focus()},size:12,color:L.wL.brownGrey,css:T,children:t}),(0,n.tZ)("textarea",{ref:c,onChange:e=>{i(e.target.value)},maxLength:r,value:l,css:S}),(0,n.BX)(u.Z,{color:l.length{t(e.target.value)},[]);return(0,y.useEffect)(()=>{let e=b()().set("date",1),t=[{Label:"".concat(b().localeData().months()[e.month()]," ").concat(e.year()),Value:e.format("DD-MM-YYYY")}];for(let e=1;e<=12;e++){let i=b()().set("date",1).subtract(e,"month");t.push({Label:"".concat(b().localeData().months()[i.month()]," ").concat(i.year()),Value:i.format("DD-MM-YYYY")})}o(t)},[]),(0,n.BX)(a.Flex,{flexDirection:"column",children:[(0,n.tZ)(E,{title:"Konaklama Tarihi"}),(0,n.tZ)(P.Z,{customWrapper:F,onSelect:r,placeholder:"Tarih Se\xe7in",options:l,defaultValue:i})]})};let _=(0,l.iv)("margin-top:12px;margin-bottom:18px;");var I=(0,y.memo)(function(e){let{commentTitle:t,setCommentTitle:i,comment:l,setComment:o,selectedDate:r,onSelectDate:c}=e;return(0,n.BX)(a.Box,{p:"15px 0",children:[(0,n.tZ)(E,{title:"Yorum Yazın"}),(0,n.tZ)(X.Z,{containerStyle:_,value:t,onChange:e=>i(e.target.value),label:"Yorum Başlığı"}),(0,n.tZ)(D,{value:l,setValue:o,label:"Yorumunuzu Yazın"}),(0,n.tZ)(A,{selectedDate:r,onSelectDate:c})]})}),N=i(69497),O=i(31696),R=i(79182);let M=(0,l.iv)("border-radius:4px;margin:0px;"),j=(0,l.iv)("background-color:",L.wL.white,";");var K=function(e){let{image:t,title:i,locationTree:l,handleCommentModalClose:r,rating:c}=e,s=(0,y.useMemo)(()=>{let t="";switch(e.catalogType){case g.H.Poi:t="mekanı";break;case g.H.Facility:t="oteli";break;case g.H.Place:t="yeri";break;case g.H.Attraction:t="aktiviteyi";break;case g.H.Villa:t="villayı";break;default:t="oteli"}return t},[e.catalogType]),p=(0,y.useCallback)(()=>{let e=(0,N.qt)(l);return"".concat(e[0]," / ").concat(e[1])},[l]);return(0,n.BX)(n.HY,{children:[(0,n.BX)(a.Flex,{justifyContent:"space-between",p:"25px 5px 15px 0px",alignItems:"center",children:[(0,n.tZ)(u.Z,{size:26,weight:500,children:"Yorumunuzu Bırakın"}),(0,n.tZ)(a.Box,{css:L.Rx,children:(0,n.tZ)(d.Z,{width:24,height:24,onClick:r})})]}),(0,n.BX)(a.Flex,{p:"15px",m:"10px 0",css:[j,L.zp],children:[(0,n.tZ)(o.h,{css:M,src:t?(0,O.HB)({src:t,width:105}):"".concat(h.kq,"no-photo.svg"),layout:"fixed",width:105,height:59}),(0,n.BX)(a.Box,{ml:"10px",children:[!!c&&(0,n.tZ)(R.Z,{pt:"4px",rating:c}),(0,n.tZ)(u.Z,{mt:"4px",size:13,weight:600,children:i}),p()&&(0,n.tZ)(u.Z,{color:L.wL.brownGrey3,mt:"6px",size:11,children:p()})]})]}),(0,n.tZ)(a.Box,{p:"25px 25px 0 25px",css:j,children:(0,n.BX)(u.Z,{children:["Bizim i\xe7in g\xf6r\xfcşleriniz \xe7ok değerli. Aşağıdaki alanlardan konakladığınız ",s," ","değerlendirip, yorumlarınızı belirtebilirsiniz."]})})]})},V=y.memo(function(e){return(0,n.tZ)("svg",{width:"18",height:"18",...e,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:(0,n.tZ)("circle",{cx:"61",cy:"9",r:"7",transform:"translate(-52)",stroke:"#E3E3E3","stroke-width":"4",fill:"none","fill-rule":"evenodd"})})});let q=e=>(0,l.iv)("cursor:pointer;margin-right:8px;circle{stroke:",e?L.wL.blue3:L.wL.veryLightPink2,";}&:last-child{margin-right:15px;}"),Q=(0,l.iv)("cursor:pointer;margin-right:8px;circle{stroke:",L.wL.paleRed,";}&:last-child{margin-right:15px;}");var U=(0,y.memo)(function(e){let{commentRings:t,setCommentRings:i,isSubmit:l,noRatingSubmitAttempt:o}=e,[r,c]=(0,y.useState)([,,,,,].fill("")),s=(0,y.useCallback)((e,n)=>{l||(t[e].point==n+1?t[e].point=0:t[e].point=n+1,i(t),c([,,,,,].fill("")))},[t,l]),d=(0,y.useCallback)((e,t)=>r.map((i,l)=>(0,n.tZ)(V,{onClick:()=>s(e,l),css:o?Q:q(l(0,n.tZ)(n.HY,{children:(0,n.BX)(a.Flex,{mt:"20px",children:[e.title&&(0,n.tZ)(u.Z,{width:1/4,children:e.title}),(0,n.BX)(a.Flex,{width:1,alignItems:"center",children:[d(t,e.point),(0,n.tZ)(u.Z,{size:10,color:o?L.wL.paleRed:L.wL.brownGrey3,children:"Puan Verin"})]})]})}))),o&&(0,n.tZ)(a.Flex,{mt:"20px",ml:"65px",children:(0,n.tZ)(u.Z,{size:12,color:L.wL.paleRed,children:"L\xfctfen en az bir se\xe7eneğe puan veriniz"})})]})});let J=(0,l.iv)("background-color:",L.wL.white,";"),W=(0,l.iv)("border-radius:4px;",L._Q.tablet,"{width:82px;height:46px;}"),$=e=>(0,l.iv)("position:relative;border-bottom:1px solid ",L.wL.veryLightPink2,";border-radius:4px;height:auto;&:nth-child(even){border-left:1px solid ",L.wL.veryLightPink2,";}",L._Q.tablet,"{padding:0;}"),ee=(0,l.iv)("height:39px;font-size:12px;"),et=e=>(0,l.iv)("display:",e?"block":"none",";position:absolute;top:calc(100% + 1px);width:100%;background:",L.wL.white,";z-index:1;left:0;");var ei=function(e){let{image:t,title:i,locationTree:l,expandedCard:c,setExpandedCard:d,index:p,defaultParams:g}=e,[m,v]=(0,y.useState)(""),[x,f]=(0,y.useState)(""),[b,w]=(0,y.useState)(""),[Z,B]=(0,y.useState)(!1),[C,z]=(0,y.useState)([]),{ratingGroups:T,isLoading:S,sendSubmitRequest:D}=k({fetchInitialData:!1,ratingGroups:e.ratingGroups?e.ratingGroups.filter(e=>"GENEL"===e.title).map(e=>({...e,point:0,title:""})):[],objectId:e.objectId,catalogType:e.catalogType,detail:e.detail,defaultParams:g}),X=(0,y.useCallback)(()=>{d(c==p?-1:p)},[c,p]),P=(0,y.useCallback)(e=>{z(e.map(e=>({RatingGroup:e.ref,RatingValue:e.point})))},[]),H=(0,y.useCallback)(()=>{D({selectedRatingGroups:C,commentTitle:x,comment:m,accomondationDate:b}),B(!0)},[C,x,m,b]),E=(0,y.useCallback)(e=>{w(e)},[b]),Y=(0,y.useCallback)(()=>{let e=(0,N.qt)(l);return"".concat(e[0]," / ").concat(e[1])},[l]);return(0,n.BX)(a.Box,{width:.5,css:$(c==p||Z),mb:"13px",p:"0 15px 15px 15px",children:[!S&&(0,n.BX)(n.HY,{children:[(0,n.BX)(a.Flex,{css:[J,L.Rx],p:"15px",children:[(0,n.tZ)(o.h,{onClick:X,css:W,src:t?(0,O.HB)({src:t,width:162}):"".concat(h.kq,"no-photo.svg"),layout:"fixed",width:162,height:91}),(0,n.BX)(a.Box,{ml:"10px",children:[(0,n.tZ)(u.Z,{size:14,onClick:X,weight:600,children:i}),Y()&&(0,n.tZ)(u.Z,{onClick:X,color:L.wL.brownGrey3,mt:"6px",size:13,children:Y()}),(0,n.tZ)(a.Box,{onClick:c!=p?X:()=>{},children:(0,n.tZ)(U,{isSubmit:Z,setCommentRings:P,commentRings:T})})]})]}),Z?(0,n.BX)(a.Flex,{mt:"15px",pb:"15px",children:[(0,n.tZ)(o.h,{width:42,height:42,layout:"fixed",src:"".concat(h.kq,"comment-approve.svg")}),(0,n.tZ)(u.Z,{ml:"10px",size:16,children:"Değerlendirmeniz i\xe7in teşekk\xfcrler. G\xf6r\xfcşleriniz incelendikten sonra sitemizde yayınlanacaktır."})]}):(0,n.BX)(a.Box,{p:"0 15px",css:et(c==p),children:[(0,n.tZ)(I,{commentTitle:x,setCommentTitle:f,comment:m,setComment:v,selectedDate:b,onSelectDate:E}),(0,n.tZ)(r.Z,{disabled:""==m||""==x||""==b,buttonCss:ee,bgColor:L.wL.white,color:L.wL.blue3,onClick:H,label:"KAYDET"})]})]}),S&&(0,n.tZ)(s.Z,{height:"300px"})]})};let en=(0,l.iv)("background-color:",L.wL.white,";height:100%;");var el=function(e){let{sectionRef:t,facilities:i,defaultParams:l}=e,[o,r]=(0,y.useState)(-1),c=(0,y.useMemo)(()=>{let t="";switch(e.catalogType){case g.H.Poi:t="Mekanın";break;case g.H.Facility:t="Otelin";break;case g.H.Place:t="Kaldığınız yerin";break;case g.H.Attraction:t="Aktivitenin";break;case g.H.Villa:t="Villanın";break;default:t="Otelin"}return t},[e.catalogType]),s=(0,y.useMemo)(()=>i?i.map((t,i)=>{var a,c;return(0,n.tZ)(ei,{index:i,setExpandedCard:r,expandedCard:o,image:null===(c=t.images)||void 0===c?void 0:null===(a=c[0])||void 0===a?void 0:a.image,title:t.name,locationTree:t.locationTree,detail:t,objectId:t.objectId,catalogType:g.H.Facility,ratingGroups:e.ratingGroups,defaultParams:l},"near-commentable-facility-".concat(i))}):[],[o,r,i]);return(0,n.BX)(a.Box,{ref:t,p:"15px",mt:"8px",css:en,children:[(0,n.BX)(u.Z,{size:16,mb:"15px",weight:"bold",children:[c," Yakınındaki Bu Mekanlara Gittiniz Mi?"]}),(0,n.tZ)(a.Flex,{flexWrap:"wrap",children:s})]})},ea=i(1092);let eo=e=>(0,l.iv)("background-color:",L.wL.greyWhite,";padding:0;height:",e?"300px":"500px",";",L._Q.tablet,"{padding:20px 20px;}"),er=(0,l.iv)("background-color:",L.wL.greyWhite,";z-index:100;overflow:scroll;overflow-x:hidden;max-width:977px;height:500px;left:50%;top:50%;transform:translate(-50%,-50%);padding:0 15px;",L._Q.tablet,"{height:500px;}"),ec=(0,l.iv)("background-color:",L.wL.white,";"),es=(0,l.iv)("border-bottom:0.7px solid ",L.wL.veryLightPink2,";padding-bottom:15px;margin:25px 0 20px 0;"),ed=(0,l.iv)("width:100%;height:100vh;display:block;position:fixed;left:0;top:0;background-color:",L.wL.black,";opacity:0.7;"),eu=(0,l.iv)("margin-top:20px;");var ep=(0,y.memo)(function(e){let{image:t,title:i,locationTree:l,show:m,setShow:v,catalogType:x,rating:f,defaultParams:b}=e,[w,z]=(0,y.useState)(""),[T,S]=(0,y.useState)(""),{userPersonal:D}=(0,p.q)(p.S),[X,P]=(0,y.useState)([]),[H,Y]=(0,y.useState)(),G=(0,y.useRef)(null),{travelPurposes:F,ratingGroups:A,isLoading:_,sendSubmitRequest:N,commentableFacilities:O}=k({fetchInitialData:m,objectId:e.objectId,catalogType:x,detail:e.detail,defaultParams:b}),[R,M]=(0,y.useState)(""),[j,V]=(0,y.useState)(!1),[q,Q]=(0,y.useState)(!1);(0,y.useEffect)(()=>{X.length>0&&Q(!1)},[X]);let J=(0,y.useCallback)(()=>{v(!1)},[]),W=(0,y.useCallback)(()=>m&&(0,n.tZ)(a.Box,{onClick:J,css:ed}),[m]),$=(0,y.useCallback)(e=>{M(e)},[R]),ee=(0,y.useCallback)(()=>{if(0===X.length){Q(!0);return}(0,ea.AB)((0,ea.pZ)()),Q(!1),(null==G?void 0:G.current)&&(0,Z.b)(G),V(!0),N({selectedRatingGroups:X,selectedTravelPurpose:H,commentTitle:T,comment:w,accomondationDate:R,getNearestLocations:!0})},[X,H,D,e,w,T,R]),et=(0,y.useCallback)(e=>{Y(e)},[]),ei=(0,y.useCallback)(e=>{P(e.map(e=>({RatingGroup:e.ref,RatingValue:e.point})))},[]),en=()=>{let t="Oteli Değerlendirin";switch(e.catalogType){case g.H.Poi:case g.H.Place:case g.H.Attraction:t="Konumu Değerlendirin";break;case g.H.Villa:t="Villayı Değerlendirin"}return t},ep=(0,y.useCallback)(()=>(0,n.tZ)(n.HY,{children:j?(0,n.tZ)(n.HY,{children:(0,n.tZ)(C.Z,{containerStyle:er,show:m,children:(0,n.BX)(B.Z,{css:[L.o4,eo(j)],children:[(0,n.BX)(a.Flex,{justifyContent:"space-between",p:"25px 5px 15px 0px",alignItems:"center",children:[(0,n.tZ)(u.Z,{size:26,weight:500,children:"Teşekk\xfcrler"}),(0,n.tZ)(a.Box,{css:L.Rx,children:(0,n.tZ)(d.Z,{width:24,height:24,onClick:J})})]}),_&&(0,n.BX)(n.HY,{children:[(0,n.tZ)(s.Z,{height:"150px"}),(0,n.tZ)(s.Z,{height:"300px",css:eu})]}),!_&&(0,n.BX)(n.HY,{children:[(0,n.BX)(a.Flex,{p:"25px",css:ec,children:[(0,n.tZ)(o.h,{width:42,height:42,layout:"fixed",src:"".concat(h.kq,"comment-approve.svg")}),(0,n.BX)(u.Z,{ml:"10px",size:16,children:[D.userName," ",D.userSurName,", değerlendirmeniz i\xe7in teşekk\xfcrler. G\xf6r\xfcşleriniz incelendikten sonra sitemizde yayınlanacaktır."]})]}),(0,n.tZ)(el,{sectionRef:G,ratingGroups:A,facilities:O,catalogType:x,defaultParams:b})]})]})})}):(0,n.tZ)(C.Z,{containerStyle:er,show:m,children:(0,n.tZ)(B.Z,{css:[L.o4,eo(j)],children:(0,n.BX)(a.Box,{children:[(0,n.tZ)(K,{handleCommentModalClose:J,image:t,title:i,locationTree:l,catalogType:x,rating:f}),_&&(0,n.BX)(n.HY,{children:[(0,n.tZ)(s.Z,{height:"150px"}),(0,n.tZ)(s.Z,{height:"150px",css:eu}),(0,n.tZ)(s.Z,{height:"150px",css:eu}),(0,n.tZ)(s.Z,{height:"150px",css:eu})]}),!_&&(0,n.tZ)(n.HY,{children:(0,n.BX)(a.Box,{p:"25px",css:ec,children:[!!F&&(0,n.BX)(n.HY,{children:[(0,n.tZ)(E,{title:"Seyahat Amacınızı Se\xe7iniz",isOptional:!0}),(0,n.tZ)(c.Z,{externalCss:es,items:F,onChange:et})]}),(0,n.tZ)(E,{title:en()}),!j&&(0,n.tZ)(U,{setCommentRings:ei,commentRings:A,noRatingSubmitAttempt:q}),(0,n.tZ)(I,{commentTitle:T,setCommentTitle:S,comment:w,setComment:z,selectedDate:R,onSelectDate:$}),(0,n.tZ)(r.Z,{disabled:""==w||""==T||""==R,m:"15px 0",label:"G\xd6NDER",onClick:ee})]})})]})})})}),[m,j,T,w,_,R,X,q]);return(0,n.BX)(n.HY,{children:[ep(),W()," "]})})},37935:function(e,t,i){i.d(t,{I0:function(){return r},TX:function(){return u},Zy:function(){return o},aP:function(){return d},c0:function(){return s},gS:function(){return a},lm:function(){return c}});var n=i(69767);let l=n.fR+"api/",a=(e,t)=>(0,n.zD)("user/update-user-info","PUT",JSON.stringify(e),n.LX.DEFAULT,!1,{Authorization:"Bearer ".concat(t)}),o=(e,t,i)=>(0,n.zD)("user/update-user-password","PUT",JSON.stringify({id:e,password:t}),n.LX.DEFAULT,!1,{Authorization:"Bearer ".concat(i)});function r(e){return fetch(l+"security/refreshToken",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({RefreshToken:e})})}function c(e,t){return fetch(l+"security/VerifyEmail",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({Id:e,Token:t})})}function s(e,t,i){return fetch(l+"security/ResetPassword",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({Token:t,Id:e,Password:i})})}let d=(e,t)=>(0,n.zD)("comment/get-user-comments".concat((0,n.$d)(e)),"GET",void 0,n.LX.DEFAULT,!1,{Authorization:"Bearer ".concat(t),"Cache-Control":"no-cache"});function u(e){fetch(l+"security/logout",{method:"POST",cache:"no-cache",credentials:"include",mode:"cors",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}})}},33655:function(e,t,i){i.d(t,{$T:function(){return o},Yr:function(){return r},li:function(){return l},wS:function(){return a}});var n=i(69767);let l=(e,t)=>(0,n.zD)("api/facilityDetail/get-comments".concat((0,n.$d)(e)),"GET",void 0,n.LX.DEFAULT,t),a=e=>(0,n.zD)("/comment/ratingGroup/Query".concat((0,n.wx)(e)),"GET",void 0,n.LX.DEFAULT,!1),o=()=>(0,n.zD)("/comment/travelPurpose/Query","GET",void 0,n.LX.DEFAULT,!1),r=(e,t,i)=>(0,n.zD)("comment/create-user-".concat(i,"-comment"),"POST",JSON.stringify(e),n.LX.DEFAULT,!1,{Authorization:"Bearer ".concat(t)})},64416:function(e,t,i){i.d(t,{v:function(){return l}});var n=i(67294);function l(){let[e,t]=(0,n.useState)(),i=(0,n.useCallback)(e=>{t(window.scrollY)},[]);return(0,n.useEffect)(()=>(window.addEventListener("scroll",i),()=>{window.removeEventListener("scroll",()=>i)}),[i]),e}},63176:function(e,t,i){i.d(t,{A:function(){return l}});var n=i(67294);function l(e,t){let[i,l]=(0,n.useState)(!1),[a,o]=(0,n.useState)(),r=(0,n.useCallback)(e=>{if(a){let e=a-((null==t?void 0:t.current)?49:0);if(window.scrollY>e){var i;let e=null==t?void 0:null===(i=t.current)||void 0===i?void 0:i.offsetTop;e&&window.scrollY>=e?l(!1):l(!0)}else l(!1)}},[a,null==t?void 0:t.current]);return(0,n.useEffect)(()=>{e.current&&o(e.current.offsetTop)},[e]),(0,n.useEffect)(()=>(window.addEventListener("scroll",r),()=>{window.removeEventListener("scroll",()=>r)}),[r]),i}},25206:function(e,t,i){var n=i(35944),l=i(70917),a=i(66455),o=i(1205),r=i(34665);i(67294);var c=i(33463),s=i(27484),d=i.n(s),u=i(78707),p=i(30337),h=i(69767);t.Z=function(e){let{comment:t,...i}=e,l=(0,p.i)().width<=r.Op;return(0,n.BX)(a.Flex,{css:g,...i,children:[(0,n.BX)(a.Flex,{flexDirection:"column",css:[m,y],width:.2,children:[(0,n.BX)(a.Box,{children:[void 0!==t.rating?Number.isInteger(t.rating)?null==t?void 0:t.rating:(Math.round((null==t?void 0:t.rating)*10)/10).toFixed(1):"N/A","/5 ",t.ratingText]}),(0,n.BX)(a.Flex,{mt:"3px",children:[(0,n.tZ)(u.h,{src:"".concat(h.kq,"logoicon-sm.svg"),width:14,height:15,layout:"fixed",css:[w],alt:"Neredekal.com"}),(0,n.tZ)(o.Z,{rating:t.rating,width:14,height:14})]}),(0,n.tZ)(c.Z,{fontSize:14,color:r.wL.brownGrey2,externalCss:f,weight:400,children:d()(t.date).format("DD.MM.YY")}),(0,n.tZ)(c.Z,{fontSize:14,weight:"normal",externalCss:b,children:t.userName})]}),(0,n.BX)(a.Box,{css:v,width:.8,children:[(0,n.BX)(a.Box,{mb:"14px",css:b,children:[(0,n.tZ)(c.Z,{dangerouslySetInnerHTML:{__html:t.title}}),(0,n.tZ)(c.Z,{dangerouslySetInnerHTML:{__html:t.comment},externalCss:k,maxHeight:l?54:void 0})]}),t.reply&&(0,n.BX)(a.Box,{css:x,children:[(0,n.tZ)(c.Z,{mt:1,size:14,weight:600,children:"Tesis Cevabı"}),(0,n.tZ)(c.Z,{mt:"6px",weight:400,size:14,children:t.reply})]})]})]})};let g=(0,l.iv)("width:auto;font-size:12px;font-weight:bold;border:1px solid ",r.wL.veryLightPink2,";border-radius:4px;padding:25px 24px 25px 25px;&:not(:last-child){margin-bottom:15px;}",r._Q.tablet,"{&:not(:last-child){margin-bottom:8px;}}"),m=(0,l.iv)("font-size:16px;font-weight:bold;padding-bottom:5px;"),v=(0,l.iv)("margin-left:50px;font-size:14px;"),x=(0,l.iv)("padding-top:14px;border-top:solid 0.7px ",r.wL.veryLightPink2,";"),f=(0,l.iv)("margin-top:2px;",r._Q.tablet,"{margin-top:8px;font-size:12px;}"),b=(0,l.iv)(r._Q.tablet,"{font-size:12px;}"),y=(0,l.iv)(r._Q.tablet,"{font-size:14px;}"),w=(0,l.iv)("margin-left:0px;"),k=(0,l.iv)("margin-top:6px;font-weight:normal;",r._Q.tablet,"{font-size:12px;margin-top:5px;max-height:54px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;}")}}]);