1import{e_ as Q,j as e,N as h,a0 as c,eQ as H,r as D,a as i,w as C,o as T,T as _,g as k,b as z,d as n,P as M,s as S,z as F,h as y,l as A,V as B,n as G,cM as V,I as w,eW as O}from"./index-Bw1r7obg.js";import{b as $,F as R}from"./index.esm-r7x9glkX.js";import{I as J,i as X}from"./imageGrid-Dx-gqsRC.js";import{S as L,a as Y}from"./deduction-survey-rryj1mKa.js";import{a as Z,b as ee,S as te}from"./SmallBusinessSubmitCompletePage-Bdnj8rWT.js";import{u as se,a as ie}from"./useDeleteExtraDeductionSmallBusinessesFilesMutation-DejPGx_e.js";import{u as ne}from"./useApiErrorMessage-C-UQ5dv2.js";import"./index-CTTuJjZn.js";import"./index-yTtzfSt3.js";import"./BasicInputField-Dwm6xVJD.js";import"./ResetButton-BgIfUEe7.js";import"./mergeRef-DmvARUvZ.js";import"./Label-BIyJU7Yy.js";import"./index-X6Mr1PMM.js";import"./Selector-BuVVPY4D.js";import"./createContext-ChB1ER3n.js";import"./date-DDyhR584.js";import"./ref-DndhssHR.js";try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="5cae79c0-c430-42d0-94b4-36126db831ac",t._sentryDebugIdIdentifier="sentry-dbid-5cae79c0-c430-42d0-94b4-36126db831ac")}catch{}{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t._sentryModuleMetadata=t._sentryModuleMetadata||{},t._sentryModuleMetadata[new t.Error().stack]=Object.assign({},t._sentryModuleMetadata[new t.Error().stack],{"_sentryBundlerPluginAppKey:szsapp":!0})}const a={íì¸:"íì¸",ìì :"ìì ",미리보기:"미리보기",ìë£:"ìë£"},Ce=()=>{const{rawData:t}=Q();return t.smallBusinessType===L.ì¥ì ì¸ë³µì§ì¹´ë?e(ae,{rawData:t}):e(re,{rawData:t})},ae=({rawData:t})=>{const{data:s}=h(c.szs.getExtraDeductionSmallBusinessesFile({smallBusinessId:t.id}));return e(W,{smallBusiness:t,fileUrl:s.downLoadUrl,attachedFileId:s.attachedFileId})},re=({rawData:t})=>{const{data:s}=h(c.szs.getExtraDeductionSmallBusinessesFile({smallBusinessId:t.id})),{data:o}=h(c.szs.getUsersPersonalInfo()),{data:p}=h(c.szs.getExtraDeductionSmallBusinessApplicationForm({smallBusinessId:t.id}));return e(W,{smallBusiness:t,fileUrl:s.downLoadUrl,attachedFileId:s.attachedFileId,birth:o.birth,gender:o.gender,applicationData:p})},W=({smallBusiness:t,fileUrl:s,attachedFileId:o,birth:p,gender:P,applicationData:l})=>{const g=H(),[m,r]=D.useState(a.íì¸),d=t.smallBusinessType===L.기ì
근무ì§,u=$({defaultValues:l?{...l,reg:{front:p??"",gender:P??""},address:"",signatureData:[]}:void 0}),x=()=>{r(a.ìë£)},E=()=>{d?r(a.ìì ):g.push(O.FILE_EDIT)},I=f=>{u.setValue("address",f.address),r(a.미리보기)},v=()=>{r(a.ìë£)};return m===a.ìì &&l?e(R,{...u,children:e(Z,{data:u.watch(),onSubmit:I,onBack:()=>r(a.íì¸)})}):m===a.미리보기&&l?e(R,{...u,children:e(oe,{data:u.watch(),smallBusinessId:t.id,attachedFileId:o,onNextStep:v,onEdit:()=>r(a.ìì )})}):m===a.ìë£?e(ee,{}):d?i(n.Root,{children:[e(n.Header,{newAppNavBarProps:{enabled:!1},children:i(C,{children:[e(T,{children:e(_,{})}),e(k,{children:e(z,{})})]})}),i(n.Body,{children:[e(M,{title:"ìëì ë´ì©ì¼ë¡ ì ì²í ê²ì"}),s?e(U,{children:e(de,{src:s,alt:"ì ì¶ë ìë¥"})}):e(q,{children:e(F,{typography:"subtitle16",weight:"medium",color:S.gray60,children:"ë±ë¡ë íì¼ì´ ììµëë¤"})}),e(y,{px:32})]}),e(n.Footer,{children:i(A.Column,{children:[e(B,{size:"fullWidth",onClick:x,children:"ë¤ì"}),e(y,{px:12}),e(B,{size:"fullWidth",variant:"outlineBlue",onClick:E,children:"ìì í기"})]})})]}):i(n.Root,{children:[e(n.Header,{newAppNavBarProps:{enabled:!1},children:i(C,{children:[e(T,{children:e(_,{})}),e(k,{children:e(z,{})})]})}),i(n.Body,{children:[e(M,{title:"ì¥ì ì¸ ë³µì§ì¹´ë",subTitle:"ëìì íì¸ìë¥"}),e(F,{typography:"subtitle16",weight:"bold",color:S.gray100,children:"ë³µì§ì¹´ë"}),e(y,{px:20}),s?e(ue,{children:e("li",{children:e(J,{file:s})})}):e(q,{children:e(F,{typography:"subtitle16",weight:"medium",color:S.gray60,children:"ë±ë¡ë íì¼ì´ ììµëë¤"})})]})]})};var le={name:"mhh5p2",styles:"position:absolute;
1left:0;width:100%;height:100%"};const oe=({data:t,smallBusinessId:s,attachedFileId:o,onNextStep:p,onEdit:P})=>{const l=D.useRef(null),[g,m]=D.useState(!1),r=G(),{openApiErrorSnackbar:d}=ne(),u=h(c.szs.getUsersPersonalInfo()),{mutate:x,isPending:E}=se({code:Y.기ì
근무ì§,smallBusinessId:s}),{mutateAsync:I,isPending:v}=ie(),f=E||v,j=async()=>{if(!l.current){d(new Error("문ì ìì±ì ì¤í¨íìµëë¤"));return}if(o)try{await I({smallBusinessId:s,attachedFileId:o})}catch(b){d(b);return}l.current.toBlob(b=>{if(!b){d(new Error("ì´ë¯¸ì§ ìì±ì ì¤í¨íìµëë¤"));return}const K=new File([b],`${t.username}_${u.data.id}.png`,{type:"image/png"}),N=new FormData;N.append("file",K),x(N,{onSuccess:async()=>{await r.invalidateQueries({queryKey:c.szs.getExtraDeductionSmallBusinesses().queryKey}),await r.invalidateQueries({queryKey:c.szs.getExtraDeductionSmallBusinessesFile({smallBusinessId:s}).queryKey}),p()},onError:d})})};return i(n.Root,{children:[e(n.Header,{newAppNavBarProps:{enabled:!1},children:i(C,{children:[e(T,{children:e(_,{})}),e(k,{children:e(z,{})})]})}),i(n.Body,{children:[e(M,{title:"ìëì ë´ì©ì¼ë¡ ì ì²í ê²ì"}),i(U,{children:[!g&&e(A.Center,{css:le,children:e(V,{size:"medium",variant:"gray"})}),e(te,{ref:l,data:t,onLoad:()=>m(!0)})]}),e(y,{px:32})]}),e(n.Footer,{children:i(A.Column,{children:[e(B,{size:"fullWidth",loading:f,disabled:!g,onClick:j,children:"ë¤ì"}),e(y,{px:12}),e(B,{size:"fullWidth",disabled:f,variant:"outlineBlue",onClick:P,children:"ìì í기"})]})})]})},U=w("div",{target:"e1kh12di3"})("position:relative;width:100%;border-radius:16px;overflow:hidden;border:1px solid ",S.gray20,";"),de=w("img",{target:"e1kh12di2"})({name:"1hf8woc",styles:"width:100%;height:auto;display:block"}),q=w("div",{target:"e1kh12di1"})({name:"h5p6xm",styles:"display:flex;align-items:center;justify-content:center;min-height:200px"}),ue=w("ul",{target:"e1kh12di0"})(X,";");export{W as SmallBusinessSubmittedPageInner,Ce as default};
2//# sourceMappingURL=SmallBusinessSubmittedPage-xd10QDNR.js.map
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.