1import{n as e,B as t,aR as o,aS as a,j as r,aT as s,aU as i,a0 as n,aV as l,aW as c,aX as d,L as m,C as p,a4 as u,ah as I,aY as h,aZ as x}from"./index-BORr-p-v.js";import{r as g}from"./vendor-BWJ5V0Jr.js";import{r as E,X as j,T as _,s as f,Y as C,Z as L,_ as N}from"./new-driver-app-KtR0mK1x.js";import{u as P}from"./usePageImages-CK5NAXxA.js";import{g as b}from"./utils-DCKFWQQY.js";import{w as O}from"./constants-BXnSRrVZ.js";import{I as T}from"./InstructionsNote-CQBBZEmG.js";import"./serviceWorker-CjnTv_KA.js";import"./HandleAppError-D98zY_nc.js";import"./ThemeProvider-CcFe4yfs.js";import"./index-C6t-SId7.js";const w="_error_1208o_1",R="_imageDescription_1208o_16",y=()=>{const{t:y}=e([O,"camera","damagePhotos","common"]),{context:D,name:S,goNext:k,setContext:v}=E(),W=y("common:addPhoto"),B=null==D?void 0:D.isNavigating,F=b(D),V=D.data[S],A=t({mode:"onChange",reValidateMode:"onChange",defaultValues:V}),H=A.watch(),U=g.useCallback((e=>{v(e)}),[]);j({values:H,onChange:U});const{isOnlyExternalClickHandler:M,isImageViewerOpen:Z,hasPhotosError:X,hasForbiddenUploadingPhotosError:Y,images:q,onClickInputHandlerWithViewer:Q,savePhotoFS:z,onInputDeletePhoto:G,onViewerDeletePhoto:J,onViewerRetakePhoto:K,handleImageViewerClose:$,shouldDisplayAdditionalImageInput:ee,currentImageIndex:te,mappedImageViewerImages:oe,counterLabel:ae,messageLabel:re}=P({flow:o.WILDLIFE_PROTECTION,maxImagesQuantity:a.WILDLIFE_PROTECTION}),se=r.jsx(s,{className:w,title:y("camera:errors.upload.title"),content:y("camera:errors.upload.description"),type:"error"}),ie=r.jsx(s,{className:w,title:y("camera:errors.forbidden.title"),content:y("camera:errors.forbidden.description"),type:"error"}),ne=q.map((e=>{const t=e?i({t:y,imageType:n.WILDLIFE_PROTECTION_LICENSE_NUMBER}):W;return r.jsx(l,{children:r.jsx(c,{isOnlyExternalClickHandler:M,placeholder:d,onClickInputHandler:Q(n.WILDLIFE_PROTECTION_LICENSE_NUMBER),onPhotoSelected:z(n.WILDLIFE_PROTECTION_LICENSE_NUMBER),image:e,RightIcon:_,onRightIconClick:G,labelText:t,"data-selector":"photo-input_wildlife-protection-license-number-image-input"})},e.internalId)}));return r.jsxs(m,{headerProps:{...F,title:y("title"),withProgress:!0},buttonProps:{onClick:()=>{const e=A.getValues();k(e)},disabled:B,isLoading:B},"data-selector":"layout_accident-wildlife-protection-page",children:[r.jsx(T,{label:y("description")}),r.jsxs(p,{children:[X&&se,Y&&ie,r.jsxs(u,{...A,children:[r.jsx(f,{type:"text",name:"authorityOffice",label:y("form.authorityOffice.placeholder"),"data-selector":"text-input_authority-office-input"}),r.jsx(f,{type:"text",name:"wildlifeProtectionLicenseNumber",label:y("form.wildlifeProtectionLicenseNumber.placeholder"),"data-selector":"text-input_wildlife-protection-license-number-input"})]}),r.jsx(I,{className:R,color:"secondary-content",children:y("imageDescription")}),r.jsxs(h,{children:[ne,ee&&r.jsx(l,{children:r.jsx(c,{isOnlyExternalClickHandler:M,placeholder:d,onClickInputHandler:Q(n.WILDLIFE_PROTECTION_LICENSE_NUMBER),onPhotoSelected:z(n.WILDLIFE_PROTECTION_LICENSE_NUMBER),labelText:W,"data-selector":"photo-input_add-wildlife-protection-license-number-image-input"})})]}),Z&&r.jsx(x,{isOpen:Z,startIndex:te,onClose:$,slides:oe,isWithZoom:!0,leftActionButtonIcon:r.jsx(C,{}),leftActionButtonAction:K(),rightActionButtonIcon:r.jsx(L,{}),rightActionButtonAction:J}),r.jsx(N,{isSelectFromStorageAvailable:!0,messageLabel:re,onPhotoSelected:z(),counterLabel:ae})]})]})};export{y as default};
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.