1"use strict";(globalThis.webpackChunkverisure_owa=globalThis.webpackChunkverisure_owa||[]).push([[1157],{51157(e,a,t){t.r(a),t.d(a,{cameraSettingsBreadcrumbs:()=>D,default:()=>V});var i=t(5247),s=t(69884),n=t(43433),l=t(61884),r=t(38041),o=t.n(r),d=t(26223),c=t(97465),m=t(99547),C=t(56432),S=t(47378),x=t(35600),g=t(79650),p=t(40840),b=t(96951),u=t(25922),v=t(61347),T=t(27824),h=t(2172),N=t(77491),E=t(20485);const w={card:"jSq9at","card-text-content":"Y5UdXV",cardTextContent:"Y5UdXV","card-text-field":"CnKOid",cardTextField:"CnKOid","card-text-info":"NhziQe",cardTextInfo:"NhziQe",disabled:"OH7HkH"};var A=t(51367);const D=e=>[{name:C.J.CAMVIEW},{name:e("Cameras.Settings.TitleBar.title.label"),navigation:"GOBACK"}],j={custom:{nameP:!0},samsung:{nameS:!0,general:!0,events:!0,sd:!0,network:!0,timezone:!0},pir:{nameP:!0},vc4:{nameP:!0}},k=e=>{let{demoMode:a,dispatch:t,alias:s,serial:n,numinst:r}=e;const[o,m]=(0,i.useState)(s),[C,S]=(0,i.useState)(s),[x,p]=(0,i.useState)(!1),[v,{error:E},D]=(0,b.i1)(T.oS,{onCompleted:e=>{if(e&&"OK"===e.res){const e=(0,N.Nx)(C);S(e),m(e),j({serial:n,name:e})}else p(!0)}}),j=e=>(0,h.dx)(e).then(()=>t((0,u.D)({type:"completed",title:(0,l.t)("Cameras.Settings.nameChanged.label")})));return(0,A.jsxs)(g.Zp,{noPadding:!0,className:w.card,children:[(0,A.jsx)(d.k,{"id-owa":"CameraSettings-Alias",value:C,iconType:c.kQ.PENCIL,placeholder:(0,l.t)("Cameras.Settings.CameraAlias.placeholder.label"),onChange:e=>S(e),onFocusLost:e=>{e?o===e||a||v({variables:{numinst:r,newAlias:(0,N.Nx)(e),oldAlias:o,serial:n}}):S(o)}}),(E||x)&&(0,A.jsx)(g.AA,{"id-owa":"UpdName-ErrorModal",cancelText:(0,l.t)("common.close"),onCancel:()=>E?D():p(!1),error:E,description:(0,l.t)("Cameras.Settings.nameChange.error")})]})},O=e=>{let{dispatch:a,numinst:t,panel:s,device:n}=e;const[r,o]=(0,i.useState)(n.alias),[m,C]=(0,i.useState)(n.alias),[S,x]=(0,i.useState)(!1);return(0,A.jsx)(b.aS,{operation:T.HC,query:T.Gp,queryVariables:{numinst:t},text:(0,l.t)("Device.DeviceDetails.updateDeviceName.loading"),errorTitle:(0,l.t)("Device.DeviceDetails.errorTitle.label"),onCompleted:e=>{e&&"OK"===e.res&&a((0,u.D)({type:"completed",title:(0,l.t)("Device.DeviceDetails.nameChanged.label")}))},render:e=>(0,A.jsxs)("div",{className:w.rowWrapper,children:[(0,A.jsx)(d.k,{"id-owa":"CameraSettings-Alias",placeholder:(0,l.t)("Device.DeviceDetails.name.label"),value:r,iconType:c.kQ.PENCIL,onChange:e=>o(e),onFocusLost:a=>{m!==a&&((0,v.eh)(a)?(e({variables:{alias:a,numinst:t,device:n.code,type:n.type,panel:s}}),C(a)):(o(m),x(!0)))}}),S&&(0,A.jsx)(g.AA,{"id-owa":"DeviceDetails-NameValidation-ErrorModal",onCancel:()=>x(!1),description:(0,l.t)("Device.DeviceDetails.name.validations.notValid")})]})})},M=e=>{let{"id-owa":a,field:t,text:i,disabled:s,onClick:n=()=>{}}=e;return(0,A.jsx)(g.Zp,{noPadding:!0,noMargin:!0,className:w.card,children:(0,A.jsxs)("section",{className:w.cardTextContent,"id-owa":a,onClick:n,children:[(0,A.jsx)("div",{className:w.cardTextField,children:t}),(0,A.jsx)("div",{className:o()(w.cardTextInfo,s&&w.disabled),children:i})]})})},I=e=>{let{"id-owa":a,text:t,subtext:i,onClick:s}=e;return(0,A.jsx)(g.Zp,{noPadding:!0,className:w.card,children:(0,A.jsx)(g.E7,{"id-owa":a,text:t,subText:i,icon:"icon-arrow-right",iconColor:p.Tj.RED,onClick:s})})},V=()=>{const e=(0,s.zy)(),{state:{serial:a,alias:t,model:i,isOnline:r,type:o,code:d,capabilities:c={},camType:g}={}}=e||{},p={capabilities:c,model:i,isOnline:r},b=j[g],u=(0,s.Zp)(),v=(0,n.wA)(),{installation:{numinst:T,panel:h,role:w}}=(0,S.eC)(),D=(0,S._K)(),V=(0,S.Iu)(),y=(0,N.DB)(a,V,w);return b?(0,A.jsxs)(m.U3,{title:(0,l.t)("Cameras.Settings.TitleBar.title.label"),contentArea:{type:m.U3.contentArea.SECONDARY,breadcrumbs:[{name:(0,l.t)("Cameras.CameraViewSettings.title.label",{name:t}),path:"/cameras-view"}]},services:["CAMERAS"],children:[b.nameP&&(0,A.jsx)(O,{dispatch:v,numinst:T,panel:h,device:{code:d,type:o,alias:t}}),b.nameS&&(0,A.jsx)(k,{demoMode:D,dispatch:v,alias:t,serial:a,numinst:T}),b.general&&(0,A.jsx)(I,{"id-owa":"CameraSettings-General",text:(0,l.t)("Cameras.Settings.GeneralSettings.title.label"),subtext:(0,l.t)("Cameras.Settings.GeneralSettings.description.label"),onClick:()=>u((0,x.bO)(C.J.CAM_SETTINGS_GENERAL,{id:a}),{state:{...p,camerasOrigin:C.J.CAMVIEW}})}),b.events&&(0,A.jsx)(I,{"id-owa":"CameraSettings-Event",text:(0,l.t)("Cameras.Settings.Events.title.label"),subtext:(0,l.t)("Cameras.Settings.Events.description.label"),onClick:()=>u((0,x.bO)(C.J.CAM_SETTINGS_EVENTS,{id:a}),{state:{...p,camerasOrigin:C.J.CAMVIEW}})}),b.sd&&c.hasSDCard&&(0,A.jsx)(I,{"id-owa":"CameraSettings-SDCard",text:(0,l.t)("Cameras.Settings.SDCard.title.label"),subtext:(0,l.t)("Cameras.Settings.SDCard.description.label"),onClick:()=>u((0,x.bO)(C.J.CAM_SD_SETTINGS,{id:a}),{state:{...p,camerasOrigin:C.J.CAMVIEW}})}),b.network&&(0,A.jsx)(I,{"id-owa":"CameraSettings-Network",text:(0,l.t)("Cameras.Settings.Network.title.label"),subText:(0,l.t)("Cameras.Settings.Network.description.label"),onClick:()=>u((0,x.bO)(C.J.CAM_NETWORK_SETTINGS,{id:a}),{state:{...p,camerasOrigin:C.J.CAMVIEW}})}),b.timezone&&(0,A.jsx)(I,{"id-owa":"CameraSettings-Time",text:(0,l.t)("Cameras.Settings.TimeSettings.title.label"),onClick:()=>u((0,x.bO)(C.J.CAM_TIMEZONE_SETTINGS,{id:a}),{state:{...p,camerasOrigin:C.J.CAMVIEW}})}),y&&(0,A.jsx)(E.Fb,{serialNumber:a,cameraName:t}),a&&g!==N.Rp.pir&&(0,A.jsx)(M,{field:(0,l.t)("Cameras.CamerasView.serialNumber.field"),text:a,disabled:!0}),a&&(g===N.Rp.samsung||g===N.Rp.catalog)&&(0,A.jsx)(M,{field:(0,l.t)("Cameras.Settings.objectRecognition.field"),text:(0,l.t)("common.no"),disabled:!0})]}):u(C.J.HOME)}}}]);
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.