1"use strict";(globalThis.webpackChunkverisure_owa=globalThis.webpackChunkverisure_owa||[]).push([[3297],{23297(e,i,t){t.r(i),t.d(i,{default:()=>T});var a=t(5247),l=t(61884),s=t(69884),n=t(99547),o=t(56432),r=t(79650),c=t(96951),d=t(89665),u=t(60958),m=t(86804),p=t(96307),h=t(86993),P=t(89078),g=t(42866),A=t(84151),x=t(81175),C=t(51367);const v=e=>{let{onCreate:i,selectPlace:t,sFamilies:{serviceProperties:{maxPlaces:s}},modeOnboarding:o=!1}=e;const[c,d]=(0,a.useState)([]),{data:{userId:u,userNames:p,mainCircle:v}}=(0,m._q)(),[{fetchAllPlaces:b},{loading:F}]=(0,m.IH)({circleUuid:null===v||void 0===v?void 0:v.circleUuid,onFinish:d}),S=(0,h.c1)(null===v||void 0===v?void 0:v.role),I=e=>{var i,t;let{userAlerts:a}=e;const s=(null===a||void 0===a?void 0:a.filter(e=>e.trackedUsersAlerts.some(e=>e.userId===u&&(e.in||e.out))))||[],n=(null===a||void 0===a||null===(i=a.find(e=>e.userId===u))||void 0===i||null===(t=i.trackedUsersAlerts)||void 0===t?void 0:t.filter(e=>e.in||e.out))||[];if(S&&!s.length||!S&&!n.length)return(0,l.t)("GuardianFamilies.placesList.place.noAlerts");return(S?(0,l.t)("GuardianFamilies.placesList.place.alertsAboutMe"):(0,l.t)("GuardianFamilies.placesList.place.alertsAbout"))+": "+(S?s.map(e=>p[e.userId]).join(", "):(0,h.yv)(n))};return(0,a.useEffect)(()=>{b()},[]),F?(0,C.jsx)(n.Rh,{withSomeHeight:!0}):o||null===c||void 0===c||!c.length?(0,C.jsx)(P.wC,{img:h.PK,text:(0,l.t)("GuardianFamilies.placesList.empty.info"),textBtn:(0,l.t)("GuardianFamilies.placesList.addPlace.btn"),onClick:()=>{o||((0,A.logUserEvent)(g.FAMILIES_PLACE_CREATION_START)(),i())},disabledBtn:S,highlightButton:o}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{children:c.map((e,i)=>(0,C.jsx)(r.Zp,{noPadding:!0,className:x.A.cardPlace,children:(0,C.jsx)(r.E7,{"id-owa":`place-${i}`,className:x.A.cardPlace,text:e.name,subText:I(e),icon:"icon-arrow-right",iconLeft:h.yI[e.category],onClick:()=>{(0,A.logUserEvent)(g.FAMILIES_PLACE_EDIT_START)(),t(e)}})},e.placeUuid))}),!S&&c.length>=s&&(0,C.jsx)("p",{className:x.A.maxPlaces,children:(0,l.t)("GuardianFamilies.placesList.addPlace.maxPlaces.text")}),(0,C.jsx)(r.$n,{text:(0,l.t)("GuardianFamilies.placesList.addPlace.btn"),onClick:()=>{(0,A.logUserEvent)(g.FAMILIES_PLACE_CREATION_START)(),i()},disabled:S||c.length>=s})]})},b=a.memo(v),F=[{title:"Places.Onboarding.tooltip.title",description:"Places.Onboarding.tooltip.description"}],S=()=>{const e=(0,s.Zp)(),i=()=>e(o.J.PP_FAMILIES_PLACES);return(0,C.jsx)(n.yt,{idOwa:"PP-OnboardingPlaces",steps:F,currentStep:0,tooltipKey:"needOnboardingPPStart",showBack:!1,hideTooltip:!1,setCurrentStep:i,onlyNextButton:!0,dismissOnClose:!0,nextText:"common.understood",finishText:"common.understood",onCompleted:i,onClickClose:i,customPosition:x.A.customPositionOnboardingTooltip})},I=()=>{const e=(0,s.Zp)(),{circleUuid:i,placeUuid:t,alertsUserId:h}=(0,s.g)(),[P,g]=(0,a.useState)(!1),[A,x]=(0,a.useState)(null),v=(0,s.zy)(),{modeOnboarding:F,from:I}=(null===v||void 0===v?void 0:v.state)||{},{loading:T}=(0,c.jp)(),E=(0,d.h3)(u.o1.FAMILIES),{data:{selectedCircleUuid:L,mainCircle:U}}=(0,m._q)(),{data:{updSelectedCircle:j}}=(0,m.to)(),{role:_}=U||{},[{fetchPlace:f},{loading:w}]=(0,m.IH)({onFinish:e=>{x(e),g(!0)}}),O=T||w;return(0,a.useEffect)(()=>{O||!t||!L||A||P||(i&&i!==L&&j(i),f({variables:{circleUuid:L,placeUuid:t}}))},[O,t,L,A,P]),(0,C.jsx)(n.U3,{title:(0,l.t)("GuardianFamilies.placesList.main.title"),contentArea:{type:n.U3.contentArea.SECONDARY,breadcrumbs:[{path:"/personal-protection/start",name:(0,l.t)("GuardianFamilies.placesList.main.title")}]},children:(0,C.jsxs)(r.VE,{"id-owa":"GuardianFamiliesPlaces",title:(0,l.t)("GuardianFamilies.placesList.main.title"),hasCancelButton:!0,onCancel:()=>e(I||o.J.PP_START),cancelText:(0,l.t)("common.close"),children:[O&&(0,C.jsx)(n.Rh,{withSomeHeight:!0}),!O&&!P&&E&&(0,C.jsx)(b,{circleUuid:L,onCreate:()=>g(!0),selectPlace:e=>{g(!0),x(e)},sFamilies:E,modeOnboarding:F}),!O&&P&&E&&(0,C.jsx)(p.A,{onClose:()=>{if(t)return e(o.J.PP_START);g(!1),x(null)},place:A,circleUuid:L,sFamilies:E,alertsShowed:h,role:_}),F&&(0,C.jsx)(S,{})]})})},T=a.memo(I)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.