1"use strict";(self.webpackChunkshop_react_web=self.webpackChunkshop_react_web||[]).push([[2900],{74593:(e,t,a)=>{a.d(t,{A:()=>i});var r=a(23175),n=a(70579);const i=e=>{let{width:t=24,height:a=24,$widthWt:i,$heightWt:s,stroke:o="var(--color-gray-500)"}=e;const l=.0625*t;return(0,n.jsx)(r.E,{width:t,height:a,$widthWt:i,$heightWt:s,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:(0,n.jsx)("path",{d:"M17 9.11304L11 15.113L5 9.11304",stroke:o,strokeWidth:16===t?1.5:l,strokeLinecap:"round",strokeLinejoin:"round"})})}},82562:(e,t,a)=>{a.d(t,{A:()=>i});var r=a(23175),n=a(70579);const i=e=>{let{width:t=24,height:a=24,$widthWt:i,$heightWt:s,stroke:o="var(--color-gray-500)"}=e;const l=.0625*t;return(0,n.jsx)(r.E,{width:t,height:a,$widthWt:i,$heightWt:s,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:(0,n.jsx)("path",{d:"M6 15.113L12 9.11304L18 15.113",stroke:o,strokeWidth:16===t?1.5:l,strokeLinecap:"round",strokeLinejoin:"round"})})}},6880:(e,t,a)=>{a.d(t,{A:()=>p});var r=a(65043),n=a(46655),i=a(14365),s=a(93747),o=a(47097),l=a(77249);const c=(0,i.DY)("faq",{fetchFaqList:e=>[e],fetchCategoryList:()=>["category"]});var d=a(76172),h=a(23178);const p=()=>{const{setToast:e,setDefaultErrorToast:t}=(0,h.W)((0,n.k)((e=>({setToast:e.setToast,setDefaultErrorToast:e.setDefaultErrorToast})))),[a,i]=(0,r.useState)(!1),[p,u]=(0,r.useState)([]),[g,x]=(0,r.useState)(null),[m,v]=(0,r.useState)({searchTerm:null,category:null,pageNumber:0,pageSize:10,sortBy:"id",direction:"DESC"}),[w,y]=(0,r.useState)({question:"",answer:"",categoryId:0}),{data:j,refetch:f,isSuccess:W,isFetching:S}=(q=m,(0,s.I)({queryKey:c.fetchFaqList(q).queryKey,queryFn:()=>(0,l.Pv)(q),select:e=>({content:e.content,pagination:{size:e.empty?0:e.size,totalElements:e.empty?0:e.totalElements,totalPages:e.empty?0:e.totalPages,number:e.empty?0:e.number+1}})}));var q;const{data:$}=(0,s.I)({queryKey:c.fetchCategoryList().queryKey,queryFn:()=>(0,l.hj)()}),{mutate:L}=(0,o.n)({mutationFn:e=>(0,l.Xn)(e)}),{mutate:T}=(0,o.n)({mutationFn:e=>(0,l.md)(e)}),{mutate:k}=(0,o.n)({mutationFn:e=>{let{faqId:t,params:a}=e;return(0,l.ZV)(t,a)}}),b=null===$||void 0===$?void 0:$.map((e=>({value:e.name,text:e.name})));return(0,r.useEffect)((()=>{j&&(u(j.content),x(j.pagination),i(!!j.content))}),[j]),{hasData:a,faqList:p,categoryListData:$,postFaq:()=>{try{L(w,{onSuccess:()=>{f(),e("\ub4f1\ub85d\ud588\uc5b4\uc694.","success"),window.location.replace("/admin/writing")}})}catch(a){console.log("error : ",a),t()}},deleteFaq:a=>{try{T(a,{onSuccess:()=>{f(),e("\uc0ad\uc81c\ud588\uc5b4\uc694.","success")}})}catch(r){console.log("error : ",r),t()}},patchFaq:a=>{try{k({faqId:a,params:w},{onSuccess:()=>{f(),e("\uc218\uc815\ud588\uc5b4\uc694.","success")}})}catch(r){console.log("error : ",r),t()}},pagination:g,faqListParams:m,updateParams:d.CV,setFaqListParams:v,postFaqParams:w,setPostFaqParams:y,onClear:()=>{(0,d.CV)([{valueName:"searchTerm",newValue:null},{valueName:"pageNumber",newValue:0}],v)},onMovePage:e=>{(0,d.CV)([{valueName:"pageNumber",newValue:e-1}],v)},convertedList:b,isSuccessFaqListData:W,isFetchingFaqListData:S}}},92900:(e,t,a)=>{a.r(t),a.d(t,{default:()=>j});var r=a(65043),n=a(97605),i=a(27016),s=a(59116),o=a(6880),l=a(76172),c=a(399),d=a(46703),h=a(70579);const p=e=>{const{selectedValue:t,setSelectedValue:a,tabValueArray:r,isSelectAll:n,containerWidth:i,tapWidth:s,tapPadding:o,tapPaddingWt:l,disabled:c,fontSize:p,lineHeight:u}=e,g=e=>{if(!c){if(t===e)return;a&&a(e)}};return(0,h.jsxs)(d.tT,{width:i||"100%",children:[n&&(0,h.jsx)(d.Qt,{padding:o,$paddingWt:l,width:s||"calc(100% / ".concat((null===r||void 0===r?void 0:r.length)+1,")"),onClick:()=>{g("all")},className:"all"===t?"active":"",disabled:c,$fontSize:p,$lineHeight:u,children:"\uc804\uccb4"},-1),r&&r.length>0?r.map((e=>(0,h.jsx)(d.Qt,{padding:o,$paddingWt:l,width:s||"calc(100% / ".concat((null===r||void 0===r?void 0:r.length)+1,")"),onClick:()=>g(e.value),className:t===e.value?"active":"",disabled:c,$fontSize:p,$lineHeight:u,children:e.text},e.value))):""]})};var u=a(35509),g=a(9970),x=a(48120),m=a(65650),v=a(82562),w=a(74593),y=a(33145);const j=()=>{const{hasData:e,faqList:t,pagination:a,faqListParams:d,setFaqListParams:j,onMovePage:f,onClear:W,convertedList:S}=(0,o.A)(),[q,$]=(0,r.useState)(null),[L,T]=(0,r.useState)(d.searchTerm||null),[k,b]=(0,r.useState)(d.category||"all"),[F,P]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{(0,l.CV)([{valueName:"category",newValue:"all"===k?null:k},{valueName:"pageNumber",newValue:0}],j)}),[k]),(0,h.jsxs)(y.A,{searchInput:L,setSearchInput:T,onSearch:()=>
1{if((0,l.CV)([{valueName:"searchTerm",newValue:L},{valueName:"pageNumber",newValue:0}],j),!L)return P(!1);P(!0)},onClearSearch:()=>{W(),P(!1)},children:[!e&&(0,h.jsx)(g.A,{}),(0,h.jsx)(n.pT,{padding:"0 0 24px",children:(0,h.jsx)(p,{tabValueArray:S,selectedValue:k,setSelectedValue:b,isSelectAll:!0,tapPadding:"16px 0",tapPaddingWt:"14px 0",fontSize:s.$N.size16,lineHeight:s.kj.height24})}),(0,h.jsxs)(n.He,{padding:"unset",$boxShadow:"unset",border:"1px solid var(--color-gray-200)",children:[e&&t&&t.length>0&&(0,h.jsx)(h.Fragment,{children:t.map(((e,a)=>(0,h.jsxs)(n.pT,{width:"100%",direction:"column",children:[(0,h.jsxs)(n.pT,{padding:"18px 0",justify:"start",width:"100%",$hasCursor:!0,onClick:()=>{return t=e.id,void $(t===q?null:t);var t},children:[(0,h.jsx)(n.pT,{padding:"0 16px 0 24px",width:"130px",$widthWt:"114px",$paddingWt:"0 12px",flex:"0 0 auto",children:(0,h.jsx)(n.pT,{padding:"2px 8px",radius:x.A.corner40,background:q===e.id?"var(--color-primary-50)":"var(--color-gray-100)",children:(0,h.jsx)(c.x5,{align:"center",color:q===e.id?"var(--color-primary-500-main)":"var(--color-gray-400)",children:e.categoryName})})}),(0,h.jsxs)(n.pT,{justify:"space-between",width:"100%",children:[(0,h.jsx)(n.pT,{padding:"0 20px",$paddingWt:"0 12px",children:(0,h.jsx)(c.ld,{fontWeight:s.sO.regular,color:q===e.id?"var(--color-primary-500-main)":"var(--color-gray-600)",children:e.question})}),(0,h.jsx)(n.pT,{padding:"0 24px",$paddingWt:"0 16px",children:(0,h.jsx)(u.Oi,{width:"20px",height:"20px",$widthWt:"16px",$heightWt:"16px",children:q===e.id?(0,h.jsx)(v.A,{stroke:"var(--color-primary-400)"}):(0,h.jsx)(w.A,{stroke:"var(--color-gray-200)"})})})]})]}),(t.length-1!==a||q===e.id)&&(0,h.jsx)(n.WZ,{}),q===e.id&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(n.pT,{width:"100%",justify:"start",padding:"20px 20px 20px 148px",$paddingWt:"16px 12px 16px 126px",children:(0,h.jsx)(c.ld,{fontWeight:s.sO.regular,color:"var(--color-gray-600)",children:e.answer})}),t.length-1!==a&&(0,h.jsx)(n.WZ,{})]})]},a)))}),e&&t.length<1&&(0,h.jsx)(n.He,{height:"704px",align:"center",style:{alignContent:"center"},children:(0,h.jsx)(n.pT,{direction:"column",gap:"16px",padding:"0 0 40px",children:(0,h.jsx)(m.A,{isSearched:F,searchInput:d.searchTerm,searchDescription:" \uc77c\uce58\ud558\ub294 \uc9c8\ubb38\uc774 \uc5c6\uc5b4\uc694.",description:"1:1\ubb38\uc758\uc5d0 \uc9c8\ubb38\uc744 \ub4f1\ub85d\ud574 \ubcf4\uc138\uc694.",$marginWt:F?"0":"32px 0",height:"auto"})})}),(0,h.jsx)(n.pT,{justify:"end",padding:t.length<1?"0":"16px 16px 20px",children:a&&(null===a||void 0===a?void 0:a.totalPages)>0?(0,h.jsx)(i.A,{onMovePage:f,pagination:a,margin:"0",$marginWt:"20px 0 0"}):""})]})]})}}}]); 2//# sourceMappingURL=2900.c19a98f2.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.