"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2739],{47466:function(e,t,i){var n=i(57437),r=i(2265),o=i(88862),a=i(7261),l=i(61266),d=i(35775);let s=["제품 발주","제품 등록","샘플 신청","기타 문의"];t.Z=e=>{let{title:t="비밀 혜택 신청서",subtitle:i="프로젝트 정보 작성하고, 현장 지원금을 바로 확인해보세요. ",submitLabel:o="비밀 혜택 확인하기 →",compact:p=!1,hideUpload:x=!1,uploadSlot:c,hideBudget:h=!1,productName:m,productCategory:u,productSubCategory:g,storeName:f,productSize:b,productBrandMode:z=!1,inquirySource:K,buttonFeedback:H=!1,privacyNote:O="신청 정보는 현장 지원금 산출 목적으로만 사용됩니다.",successMsg:R="\uD83C\uDF89 제품 문의 및 지원금 신청 완료\n\uD83D\uDCE9 3분 안에 문자로 현장 지원금 안내드립니다",eyebrow:W,quoteItems:G,defaultProjectName:J,showInquiryType:Q=!1}=e,[U,V]=(0,r.useState)(""),[X,ee]=(0,r.useState)(""),[et,ei]=(0,r.useState)(null!=J?J:""),[en,er]=(0,r.useState)(""),eo=!!G&&G.length>0,ea=(null!=G?G:[]).reduce((e,t)=>e+(Number(t.quantityM2)||0),0),el=(0,d.Z)();(0,r.useEffect)(()=>{el&&(el.name&&V(e=>e||el.name||""),el.phoneNumber&&ee(e=>e||el.phoneNumber||""))},[el]);let[ed,es]=(0,r.useState)(""),[ep,ex]=(0,r.useState)("PY"),[ec,eh]=(0,r.useState)(""),[em,eu]=(0,r.useState)(""),[eg,ef]=(0,r.useState)(!0),[eb,ew]=(0,r.useState)([]),[ev,ej]=(0,r.useState)(!1),ey=(0,r.useCallback)(e=>{if(!e)return;let t=Array.from(e);ew(e=>[...e,...t].slice(0,10))},[]),eC=(0,r.useCallback)(e=>{e.preventDefault(),ej(!0)},[]),ek=(0,r.useCallback)(e=>{e.preventDefault(),ej(!1)},[]),eP=(0,r.useCallback)(e=>{e.preventDefault(),ej(!1),ey(e.dataTransfer.files)},[ey]),ez=(0,r.useCallback)(e=>{ey(e.target.files),e.target.value=""},[ey]),eZ=(0,r.useCallback)(e=>{ew(t=>t.filter((t,i)=>i!==e))},[]),eI=e=>e<1024?"".concat(e,"B"):e<1048576?"".concat(Math.round(e/1024),"KB"):"".concat((e/1024/1024).toFixed(1),"MB"),[eD,eS]=(0,r.useState)(null),eE=(0,r.useRef)(null),eM=(0,r.useCallback)((e,t)=>{if(H){eS(e),eE.current&&clearTimeout(eE.current),eE.current=setTimeout(()=>eS(null),3500);return}"success"===t?a.Am.success(e):"error"===t?a.Am.error(e):a.Am.warn(e)},[H]);(0,r.useEffect)(()=>()=>{eE.current&&clearTimeout(eE.current)},[]);let{mutate:eN,isLoading:eB}=(0,l.Z)({onSuccess:()=>{eM(R,"success"),V(""),ee(""),ei(""),er(""),es(""),ex("PY"),eh(""),eu(""),ef(!0),ew([])},onError:e=>{eM((Array.isArray(e)?e.join("\n"):e)||"신청에 실패했습니다. 다시 시도해주세요.","error")}}),eF=(0,r.useMemo)(()=>U.trim().length>0&&X.trim().length>0&&et.trim().length>0&&(!Q||en.trim().length>0)&&(eo?ea>0:ed.trim().length>0)&&(h||(z?em.trim().length>0:ec.trim().length>0))&&eg,[U,X,et,ed,ec,em,eg,h,z,eo,ea,Q,en]),eY=(0,r.useCallback)(e=>{var t;if(e&&e.preventDefault(),!U.trim()){eM("담당자명을 입력해주세요.","warn");return}if(!X.trim()){eM("연락처를 입력해주세요.","warn");return}if(!et.trim()){eM("현장명을 입력해주세요.","warn");return}if(Q&&!en.trim()){eM("문의 사항을 선택해주세요.","warn");return}if(eo){if(!G.every(e=>Number(e.quantityM2)>0)){eM("모든 제품의 물량(㎡)을 입력해주세요.","warn");return}}else if(!ed.trim()){eM("면적을 입력해주세요.","warn");return}if(!h){if(z){if(!em.trim()){eM("찾으시는 제품 / 브랜드명을 입력해주세요.","warn");return}}else if(!ec.trim()){eM("예상 자재비를 입력해주세요.","warn");return}}if(!eg){eM("개인정보 수집\xb7이용에 동의해주세요.","warn");return}let i=eo?"".concat(Math.round(100*ea)/100,"㎡"):"".concat(ed.trim()).concat("PY"===ep?"평":"㎡"),n=h||z?"":"".concat(ec.trim(),"만원");eN({name:U.trim(),phoneNumber:X.trim(),position:"예약-".concat(i),companyName:"예약접수",email:"-",projectName:et.trim(),productName:(null==m?void 0:m.trim())||void 0,productCategory:(null==u?void 0:u.trim())||void 0,productSubCategory:(null==g?void 0:g.trim())||void 0,storeName:(null==f?void 0:f.trim())||void 0,materials:i,timeline:n,memo:(()=>{let e=[];return z&&em.trim()&&e.push("제품/브랜드명: ".concat(em.trim())),(null==b?void 0:b.trim())&&e.push("지정 사이즈: ".concat(b.trim())),e.length?e.join("\n"):void 0})(),inquirySource:K||void 0,inquiryType:Q&&en.trim()||void 0,memberCompanyId:null!==(t=null==el?void 0:el.id)&&void 0!==t?t:void 0,attachmentCount:eb.length,files:eb,items:eo?G:void 0})},[U,X,et,en,Q,null==el?void 0:el.id,ed,ep,ec,em,eg,eb,h,z,m,u,g,f,b,K,eN,eM,eo,G,ea]);return(0,n.jsxs)(w,{onSubmit:eY,$compact:p,children:[W&&(0,n.jsx)("div",{style:{marginBottom:12,textAlign:"left"},children:W}),(0,n.jsx)(v,{children:t}),(0,n.jsx)(j,{children:i}),(0,n.jsxs)(C,{children:[(0,n.jsxs)(y,{children:[(0,n.jsxs)(k,{children:["이름 ",(0,n.jsx)(P,{children:"*"})]}),(0,n.jsx)(Z,{type:"text",value:U,onChange:e=>V(e.target.value),placeholder:"홍길동"})]}),(0,n.jsxs)(y,{children:[(0,n.jsxs)(k,{children:["연락처 ",(0,n.jsx)(P,{children:"*"})]}),(0,n.jsx)(Z,{type:"tel",value:X,onChange:e=>ee(e.target.value),placeholder:"010-0000-0000"})]})]}),(()=>{let e=(0,n.jsxs)(y,{children:[(0,n.jsxs)(k,{children:["현장명 / 프로젝트명 ",(0,n.jsx)(P,{children:"*"})]}),(0,n.jsx)(Z,{type:"text",value:et,onChange:e=>ei(e.target.value),placeholder:"예: 강남구 주거빌라 인테리어"})]});return Q?(0,n.jsxs)(C,{children:[e,(0,n.jsxs)(y,{children:[(0,n.jsxs)(k,{children:["문의 사항 ",(0,n.jsx)(P,{children:"*"})]}),(0,n.jsxs)(I,{value:en,onChange:e=>er(e.target.value),"aria-label":"문의 사항",children:[(0,n.jsx)("option",{value:"",disabled:!0,children:"문의 사항을 선택하세요"}),s.map(e=>(0,n.jsx)("option",{value:e,children:e},e))]})]})]}):e})(),eo?null:h?(0,n.jsxs)(y,{children:[(0,n.jsxs)(k,{children:["면적 ",(0,n.jsx)(P,{children:"*"})]}),(0,n.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,n.jsx)(Z,{type:"text",inputMode:"decimal",value:ed,onChange:e=>es(e.target.value.replace(/[^\d.]/g,"")),placeholder:"숫자만 입력",style:{flex:1}}),(0,n.jsxs)(I,{value:ep,onChange:e=>ex(e.target.value),style:{width:110,flex:"0 0 auto",padding:"13px 8px"},"aria-label":"면적 단위",children:[(0,n.jsx)("option",{value:"PY",children:"평 (PY)"}),(0,n.jsx)("option",{value:"m2",children:"헤베 (m\xb2)"})]})]})]}):(0,n.jsxs)(C,{children:[(0,n.jsxs)(y,{children:[(0,n.jsxs)(k,{children:["면적 ",(0,n.jsx)(P,{children:"*"})]}),(0,n.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,n.jsx)(Z,{type:"text",inputMode:"decimal",value:ed,onChange:e=>es(e.target.value.replace(/[^\d.]/g,"")),placeholder:"예상 면적 입력",style:{flex:1}}),(0,n.jsxs)(I,{value:ep,onChange:e=>ex(e.target.value),style:{width:110,flex:"0 0 auto",padding:"13px 8px"},"aria-label":"면적 단위",children:[(0,n.jsx)("option",{value:"PY",children:"평 (PY)"}),(0,n.jsx)("option",{value:"m2",children:"헤베 (m\xb2)"})]})]})]}),(0,n.jsx)(y,{children:z?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(k,{children:["제품 / 브랜드명 ",(0,n.jsx)(P,{children:"*"})]}),(0,n.jsx)(Z,{type:"text",value:em,onChange:e=>eu(e.target.value),placeholder:"예: 한일타일 / KS-100 / 동화자연마루"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(k,{children:["예상 자재비 ",(0,n.jsx)(P,{children:"*"})]}),(0,n.jsxs)(D,{children:[(0,n.jsx)(Z,{type:"text",inputMode:"numeric",value:ec,onChange:e=>eh(e.target.value.replace(/[^\d]/g,"")),placeholder:"숫자 입력",style:{flex:1}}),(0,n.jsx)(S,{children:"만원"})]})]})})]}),x&&c&&(0,n.jsx)(y,{children:c}),!x&&(0,n.jsxs)(y,{children:[(0,n.jsxs)(k,{children:["현장 도면 / 참고 이미지 ",(0,n.jsx)(N,{children:"(선택)"})]}),(0,n.jsxs)(B,{htmlFor:"landing-inquiry-upload",$active:ev,onDragOver:eC,onDragEnter:eC,onDragLeave:ek,onDrop:eP,children:[(0,n.jsx)(F,{children:(0,n.jsxs)("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2.5"}),(0,n.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),(0,n.jsx)("path",{d:"M21 15l-5-5L5 21"})]})}),(0,n.jsxs)(Y,{children:[(0,n.jsx)("strong",{children:"이미지를 끌어다 놓거나 클릭하여 등록"}),(0,n.jsx)("span",{children:"도면(PDF) \xb7 현장 사진 \xb7 참고 이미지 — 최대 10장\xb7장당 20MB"})]}),(0,n.jsx)(q,{id:"landing-inquiry-upload",type:"file",multiple:!0,accept:"image/*,application/pdf",onChange:ez})]}),eb.length>0&&(0,n.jsx)(A,{children:eb.map((e,t)=>(0,n.jsxs)(T,{children:[(0,n.jsx)($,{children:e.name}),(0,n.jsx)(L,{children:eI(e.size)}),(0,n.jsx)(_,{type:"button",onClick:()=>eZ(t),"aria-label":"".concat(e.name," 삭제"),children:"\xd7"})]},"".concat(e.name,"-").concat(t)))})]}),(0,n.jsxs)(E,{children:[(0,n.jsx)("input",{type:"checkbox",checked:eg,onChange:e=>ef(e.target.checked)}),(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"개인정보 수집\xb7이용 동의"})," (필수) — ",O]})]}),(0,n.jsx)(M,{type:"submit",disabled:!eF||eB,$ready:eF&&!eB,$feedback:!!eD,$fixedH:H,children:eD||(eB?"신청 접수 중...":o)})]})};let p="#413D7D",x="rgba(65, 61, 125, 0.06)",c="#111111",h="#F4F2EE",m="#E5E2DC",u="#888381",g="#5F5C57",f="#2E2C28",b="#E63946",w=o.ZP.form.withConfig({componentId:"sc-66761a3-0"})(["position:relative;background:#fff;color:",";border-radius:28px;padding:44px;box-shadow:",";@media (max-width:980px){padding:32px 24px;}@media (max-width:768px){padding:14px 12px;}@media (max-width:360px){padding:12px 10px;border-radius:20px;}",""],c,"0 20px 50px rgba(0,0,0,0.12)",e=>{let{$compact:t}=e;return t&&(0,o.iv)(["padding:26px 28px;border-radius:20px;> div:nth-of-type(1){margin-bottom:16px;}> div{margin-bottom:10px;}> div > div{margin-bottom:0;}label[for='landing-inquiry-upload']{padding:10px;gap:10px;> div:first-of-type{width:44px;height:44px;border-radius:8px;}}> label:last-of-type{padding:10px 12px;margin-bottom:12px;}button[type='submit']{padding:14px;}"])}),v=o.ZP.h3.withConfig({componentId:"sc-66761a3-1"})(["font-size:22px;font-weight:800;letter-spacing:-0.02em;margin-bottom:6px;color:",";@media (max-width:768px){font-size:14px;margin-bottom:3px;}"],c),j=o.ZP.div.withConfig({componentId:"sc-66761a3-2"})(["font-size:14px;color:",";margin-bottom:28px;@media (max-width:768px){font-size:12px;margin-bottom:10px;}"],g),y=o.ZP.div.withConfig({componentId:"sc-66761a3-3"})(["margin-bottom:18px;@media (max-width:768px){margin-bottom:8px;}"]),C=o.ZP.div.withConfig({componentId:"sc-66761a3-4"})(["display:grid;grid-template-columns:1fr 1fr;gap:14px;","{margin-bottom:18px;}@media (max-width:768px){grid-template-columns:1fr;gap:8px;","{margin-bottom:8px;}}"],y,y),k=o.ZP.label.withConfig({componentId:"sc-66761a3-5"})(["display:block;font-size:13px;font-weight:700;color:",";margin-bottom:7px;@media (max-width:768px){font-size:12px;margin-bottom:4px;}"],f),P=o.ZP.span.withConfig({componentId:"sc-66761a3-6"})(["color:",";"],b),z=(0,o.iv)(["width:100%;padding:13px 16px;border:1.5px solid ",";border-radius:12px;font-family:inherit;font-size:15px;background:#fff;color:",";transition:all 0.2s;&:focus{outline:none;border-color:",";box-shadow:0 0 0 4px ",";}@media (max-width:768px){padding:8px 12px;font-size:13px;border-radius:10px;}"],m,c,p,x),Z=o.ZP.input.withConfig({componentId:"sc-66761a3-7"})(["",";"],z),I=o.ZP.select.withConfig({componentId:"sc-66761a3-8"})(["",";"],z),D=o.ZP.div.withConfig({componentId:"sc-66761a3-9"})(["display:flex;align-items:center;gap:8px;"]),S=o.ZP.span.withConfig({componentId:"sc-66761a3-10"})(["flex:0 0 auto;font-size:14px;font-weight:600;color:",";white-space:nowrap;@media (max-width:768px){font-size:13px;}"],g),E=o.ZP.label.withConfig({componentId:"sc-66761a3-11"})(["display:flex;gap:10px;align-items:flex-start;background:",";padding:14px 16px;border-radius:10px;font-size:13px;color:",";line-height:1.6;margin-bottom:20px;cursor:pointer;input{width:18px;height:18px;accent-color:",";margin-top:1px;flex-shrink:0;}strong{color:",";}@media (max-width:768px){padding:8px 10px;gap:7px;font-size:12px;line-height:1.35;color:",";margin-bottom:10px;strong{color:",";font-weight:700;}input{width:14px;height:14px;}}"],h,g,p,c,g,g),M=o.ZP.button.withConfig({componentId:"sc-66761a3-12"})(["width:100%;padding:20px;border:0;border-radius:999px;font-weight:800;font-size:16px;cursor:pointer;font-family:inherit;transition:all 0.25s;background:",";color:#fff;",";",";",";&:disabled{cursor:not-allowed;}@media (max-width:768px){padding:8px;font-size:14px;}"],p,e=>{let{$ready:t}=e;return t&&(0,o.iv)(["box-shadow:",";&:hover{background:",";transform:translateY(-2px);box-shadow:",";}"],"0 8px 24px rgba(65,61,125,0.35)","#2E2B5E","0 30px 80px rgba(65,61,125,0.30)")},e=>{let{$fixedH:t}=e;return t&&(0,o.iv)(["height:60px;padding-top:0;padding-bottom:0;display:flex;align-items:center;justify-content:center;overflow:hidden;@media (max-width:768px){height:40px;}"])},e=>{let{$feedback:t}=e;return t&&(0,o.iv)(["color:#fff;white-space:pre-line;text-align:center;font-size:13.5px;line-height:1.3;@media (max-width:768px){font-size:11.5px;line-height:1.25;}&:disabled{opacity:1;}"])}),N=o.ZP.span.withConfig({componentId:"sc-66761a3-13"})(["color:",";font-weight:500;"],u),B=o.ZP.label.withConfig({componentId:"sc-66761a3-14"})(["display:flex;gap:14px;align-items:center;padding:16px;border:1.5px dashed ",";border-radius:12px;background:",";cursor:pointer;transition:all 0.2s;&:hover{border-color:",";background:",";}@media (max-width:768px){padding:10px;gap:10px;border-radius:10px;}"],e=>{let{$active:t}=e;return t?p:"#C8C4BB"},e=>{let{$active:t}=e;return t?x:h},p,x),F=o.ZP.div.withConfig({componentId:"sc-66761a3-15"})(["flex-shrink:0;width:64px;height:64px;border-radius:10px;background:#fff;border:1px solid ",";display:grid;place-items:center;color:",";@media (max-width:768px){width:40px;height:40px;svg{width:18px;height:18px;}}"],m,p),Y=o.ZP.div.withConfig({componentId:"sc-66761a3-16"})(["flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;strong{font-size:14px;font-weight:700;color:",";}span{font-size:12px;color:",";line-height:1.5;}em{font-size:11px;color:",";margin-top:2px;font-style:normal;}@media (max-width:768px){gap:1px;strong{font-size:12px;}span{font-size:10.5px;line-height:1.35;}em{font-size:9.5px;}}"],c,g,u),q=o.ZP.input.withConfig({componentId:"sc-66761a3-17"})(["display:none;"]),A=o.ZP.ul.withConfig({componentId:"sc-66761a3-18"})(["list-style:none;display:grid;gap:6px;margin:10px 0 0;padding:0;"]),T=o.ZP.li.withConfig({componentId:"sc-66761a3-19"})(["display:flex;align-items:center;gap:10px;padding:8px 12px;background:#fff;border:1px solid ",";border-radius:8px;font-size:13px;color:",";"],m,f),$=o.ZP.span.withConfig({componentId:"sc-66761a3-20"})(["flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]),L=o.ZP.span.withConfig({componentId:"sc-66761a3-21"})(["color:",";font-size:12px;flex-shrink:0;"],u),_=o.ZP.button.withConfig({componentId:"sc-66761a3-22"})(["background:transparent;border:0;font-size:20px;line-height:1;color:",";cursor:pointer;padding:0 4px;&:hover{color:",";}"],u,b)}}]);