1"use strict";(self.webpackChunkshop_react_web=self.webpackChunkshop_react_web||[]).push([[7770],{62991:(a,t,e)=>{e.d(t,{CI:()=>n,T5:()=>s,U9:()=>c,b8:()=>o,df:()=>d,iB:()=>l,mH:()=>r,oB:()=>u,wU:()=>i});const n=1,s=3,r=33,o={standard:300,extended:500,long:1e3,defaultMax:2e3,extraLong:5e3},c={hasData:{default:423,noChat:434,tablet:485},hasNoData:{default:354,noChat:434,tablet:454}},i=99999999,l=720,d=9900,u={tel:11,verify:6,kakaoAuthToken:6,kakaoChannelId:15,password:20}},17770:(a,t,e)=>{e.r(t),e.d(t,{default:()=>y});var n=e(65043),s=e(73216),r=e(59116),o=e(97605),c=e(35509),i=e(399),l=e(40186),d=e(6880),u=e(7685),p=e(76172),h=e(61158),g=e(62991),m=e(70579);const y=()=>{var a,t,e;const y=(0,s.Zp)(),w=null===(a=(0,s.zy)().state)||void 0===a?void 0:a.editData,x=g.b8.extraLong,{postFaqParams:v,setPostFaqParams:f,postFaq:q,patchFaq:j,categoryListData:b}=(0,d.A)(),[A,C]=(0,n.useState)(!1),[F,T]=(0,n.useState)(null);return(0,n.useEffect)((()=>{""!==v.question&&""!==v.answer&&null!==F?C(!0):C(!1)}),[v,w]),(0,n.useEffect)((()=>{w&&((0,p.CV)([{valueName:"categoryId",newValue:w.categoryId},{valueName:"question",newValue:w.question},{valueName:"answer",newValue:w.answer}],f),T(w.categoryId))}),[w]),(0,m.jsxs)(o.He,{padding:"60px",children:[(0,m.jsx)(h.A,{title:w?"FAQ \uc218\uc815":"FAQ \uc791\uc131"}),(0,m.jsxs)(o.pT,{gap:"24px",margin:"40px 0 0",direction:"column",children:[(0,m.jsx)(o.bQ,{width:"100%",children:(0,m.jsxs)(o.pT,{gap:"16px",width:"100%",justify:"start",children:[(0,m.jsx)(i.U2,{width:"70px",children:"\uad6c\ubd84"}),(0,m.jsx)(o.pT,{justify:"start",gap:"8px",wrap:"wrap",children:null===b||void 0===b?void 0:b.map((a=>(0,m.jsx)(c.Ex,{border:"unset",color:F===a.id?"var(--color-white)":"var(--color-primary-500-main)",background:F===a.id?"var(--color-primary-500-main)":"var(--color-primary-200)",onClick:()=>{var t;(t=a.id)===F?(T(null),(0,p.CV)([{valueName:"categoryId",newValue:null}],f)):(T(t),(0,p.CV)([{valueName:"categoryId",newValue:t}],f))},children:a.name},a.id)))})]})}),(0,m.jsxs)(o.bQ,{width:"100%",children:[(0,m.jsxs)(o.pT,{gap:"16px",width:"100%",children:[(0,m.jsx)(i.U2,{width:"70px",children:"\uc9c8\ubb38"}),(0,m.jsx)(l.pd,{placeholder:"\uc9c8\ubb38\uc744 \uc785\ub825\ud574 \uc8fc\uc138\uc694.",value:v.question,onChange:a=>(0,p.CV)([{valueName:"question",newValue:(0,u.aM)(a.target.value,100)}],f)})]}),(0,m.jsxs)(o.pT,{justify:"space-between",margin:"0 0 0 86px",padding:"6px 0",children:[(0,m.jsx)(i.MO,{color:"var(--color-gray-400)",children:"\uc9c8\ubb38\uc740 100\uc790\uae4c\uc9c0 \uc785\ub825\ud560 \uc218 \uc788\uc5b4\uc694."}),(0,m.jsxs)(i.MO,{align:"right",color:"var(--color-gray-400)",children:[(null===(t=v.question)||void 0===t?void 0:t.length)||0,"/100"]})]})]}),(0,m.jsxs)(o.bQ,{width:"100%",children:[(0,m.jsxs)(o.pT,{gap:"16px",width:"100%",align:"top",children:[(0,m.jsx)(i.U2,{style:{paddingTop:"13px"},width:"70px",children:"\ub2f5\ubcc0"}),(0,m.jsx)(l.M0,{children:(0,m.jsx)(l.fs,{placeholder:"\ub2f5\ubcc0\uc744 \uc785\ub825\ud574 \uc8fc\uc138\uc694.",$minHeight:"300px",value:v.answer,onChange:a=>(0,p.CV)([{valueName:"answer",newValue:(0,u.aM)(a.target.value,x)}],f)})})]}),(0,m.jsxs)(o.pT,{justify:"space-between",margin:"0 0 0 86px",padding:"6px 0",children:[(0,m.jsxs)(i.MO,{color:"var(--color-gray-400)",children:["\ub2f5\ubcc0\uc740 ",x,"\uc790\uae4c\uc9c0 \uc785\ub825\ud560 \uc218 \uc788\uc5b4\uc694."]}),(0,m.jsxs)(i.MO,{align:"right",color:"var(--color-gray-400)",children:[(null===(e=v.answer)||void 0===e?void 0:e.length)||0,"/",x]})]})]})]}),(0,m.jsxs)(o.pT,{margin:"40px 0 60px",gap:"16px",children:[(0,m.jsx)(c.tB,{color:"var(--color-gray-700-main)",background:"var(--color-white)",width:"360px",fontSize:r.$N.bodyL,fontWeight:r.sO.bold,border:"1px solid var(--color-gray-100)",onClick:()=>y(-1),children:"\uc774\uc804"}),(0,m.jsx)(c.tB,{disabled:!A,width:"360px",fontSize:r.$N.bodyL,fontWeight:r.sO.bold,onClick:()=>{w?j(w.id):q()},children:"\uc644\ub8cc"})]})]})}},6880:(a,t,e)=>{e.d(t,{A:()=>p});var n=e(65043),s=e(46655),r=e(14365),o=e(93747),c=e(47097),i=e(77249);const l=(0,r.DY)("faq",{fetchFaqList:a=>[a],fetchCategoryList:()=>["category"]});var d=e(76172),u=e(23178);const p=()=>{const{setToast:a,setDefaultErrorToast:t}=(0,u.W)((0,s.k)((a=>({setToast:a.setToast,setDefaultErrorToast:a.setDefaultErrorToast}
1)))),[e,r]=(0,n.useState)(!1),[p,h]=(0,n.useState)([]),[g,m]=(0,n.useState)(null),[y,w]=(0,n.useState)({searchTerm:null,category:null,pageNumber:0,pageSize:10,sortBy:"id",direction:"DESC"}),[x,v]=(0,n.useState)({question:"",answer:"",categoryId:0}),{data:f,refetch:q,isSuccess:j,isFetching:b}=(A=y,(0,o.I)({queryKey:l.fetchFaqList(A).queryKey,queryFn:()=>(0,i.Pv)(A),select:a=>({content:a.content,pagination:{size:a.empty?0:a.size,totalElements:a.empty?0:a.totalElements,totalPages:a.empty?0:a.totalPages,number:a.empty?0:a.number+1}})}));var A;const{data:C}=(0,o.I)({queryKey:l.fetchCategoryList().queryKey,queryFn:()=>(0,i.hj)()}),{mutate:F}=(0,c.n)({mutationFn:a=>(0,i.Xn)(a)}),{mutate:T}=(0,c.n)({mutationFn:a=>(0,i.md)(a)}),{mutate:V}=(0,c.n)({mutationFn:a=>{let{faqId:t,params:e}=a;return(0,i.ZV)(t,e)}}),k=null===C||void 0===C?void 0:C.map((a=>({value:a.name,text:a.name})));return(0,n.useEffect)((()=>{f&&(h(f.content),m(f.pagination),r(!!f.content))}),[f]),{hasData:e,faqList:p,categoryListData:C,postFaq:()=>{try{F(x,{onSuccess:()=>{q(),a("\ub4f1\ub85d\ud588\uc5b4\uc694.","success"),window.location.replace("/admin/writing")}})}catch(e){console.log("error : ",e),t()}},deleteFaq:e=>{try{T(e,{onSuccess:()=>{q(),a("\uc0ad\uc81c\ud588\uc5b4\uc694.","success")}})}catch(n){console.log("error : ",n),t()}},patchFaq:e=>{try{V({faqId:e,params:x},{onSuccess:()=>{q(),a("\uc218\uc815\ud588\uc5b4\uc694.","success")}})}catch(n){console.log("error : ",n),t()}},pagination:g,faqListParams:y,updateParams:d.CV,setFaqListParams:w,postFaqParams:x,setPostFaqParams:v,onClear:()=>{(0,d.CV)([{valueName:"searchTerm",newValue:null},{valueName:"pageNumber",newValue:0}],w)},onMovePage:a=>{(0,d.CV)([{valueName:"pageNumber",newValue:a-1}],w)},convertedList:k,isSuccessFaqListData:j,isFetchingFaqListData:b}}},77249:(a,t,e)=>{e.d(t,{B8:()=>x,Op:()=>C,Pv:()=>d,RL:()=>w,Rv:()=>o,Xn:()=>p,Y2:()=>q,Z$:()=>m,ZV:()=>g,bY:()=>i,cc:()=>A,hT:()=>y,hj:()=>u,md:()=>h,nx:()=>j,rA:()=>b,rW:()=>f,sc:()=>l,uF:()=>c,ul:()=>v});var n=e(54451),s=e(65112),r=e(69835);const o=async a=>{const{data:t}=await n.A.get("/announcements",{params:a});return t},c=async a=>{const{data:t}=await n.A.get("/announcements/".concat(a));return t},i=async a=>{const{data:t}=await r.A.post("/admin/announcement",a);return t.data},l=async a=>{const{data:t}=await n.A.delete("/announcements/".concat(a));return t},d=async a=>{const{data:t}=await r.A.get("/faqs",{params:a});return t.data},u=async()=>{const{data:a}=await r.A.get("/faqs/category");return a.data},p=async a=>{const{data:t}=await n.A.post("/faqs",a);return t},h=async a=>{const{data:t}=await n.A.delete("/faqs/".concat(a));return t},g=async(a,t)=>{const{data:e}=await n.A.patch("/faqs/".concat(a),t);return e},m=async a=>{const{data:t}=await r.A.get("/inquiries",{params:a});return t.data},y=async a=>{const{data:t}=await r.A.get("/inquiries/".concat(a));return t.data},w=async a=>{const{data:t}=await r.A.post("/inquiries",a);return t.data},x=async(a,t)=>{const{data:e}=await r.A.patch("/inquiries/".concat(a),t);return e.data},v=async a=>{const{data:t}=await r.A.delete("/inquiries/".concat(a));return t.data},f=async a=>{const{data:t}=await s.A.get("/admin/blog",{params:a});return t},q=async a=>{const{data:t}=await s.A.get("/admin/blog/".concat(a));return t},j=async a=>{const{data:t}=await s.A.get("/admin/blog/tag",{params:a});return t},b=async a=>{const{data:t}=await s.A.post("/admin/blog",a);return t},A=async a=>{const{data:t}=await s.A.delete("/admin/blog/".concat(a));return t},C=async(a,t)=>{const{data:e}=await s.A.put("/admin/blog/".concat(a),t);return e}},61158:(a,t,e)=>{e.d(t,{A:()=>l});var n=e(73216),s=e(97605),r=e(399),o=e(8720),c=e(59116),i=e(70579);const l=a=>{const{title:t,hasOnlyTitle:e,backMode:l,setModal:d,onClose:u}=a,p=(0,n.Zp)();return(0,i.jsxs)(s.pT,{justify:"start",gap:"8px",children:[!e&&(0,i.jsx)(o.A,{width:"30px",height:"30px",$widthWt:"24px",$heightWt:"24px",handleBack:()=>{u?u():"formBack"===l?null===d||void 0===d||d(!0):p(-1)}}),(0,i.jsx)(r.V9,{fontSize:c.$N.size24,$lineHeight:c.kj.height32,$fontSizeWt:c.$N.size20,$lineHeightWt:c.kj.height28,$whiteSpace:"nowrap",children:t})]})}}}]); 2//# sourceMappingURL=7770.c0147742.chunk.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.