{"version":3,"file":"Notice.BIPCOKQd.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/wwRBOXVfjF0dVffpVvCe/DEhRjGWItf35kxPP6BDO/Notice.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// ============================================\n// 타이포그래피 토큰\n// ============================================\nconst typography={headline:{l:{mobile:22,desktop:28,weight:700,lineHeight:1.2},m:{mobile:20,desktop:24,weight:700,lineHeight:1.2}},title:{l:{mobile:18,desktop:22,weight:600,lineHeight:1.2},m:{mobile:16,desktop:20,weight:600,lineHeight:1.2}},body:{l:{mobile:16,desktop:18,weight:400,lineHeight:1.6},m:{mobile:14,desktop:14,weight:400,lineHeight:1.6}},supporting:{mobile:14,desktop:14,weight:400,lineHeight:1.4},caption:{mobile:12,desktop:12,weight:400,lineHeight:1.4}};// ============================================\n// 컬러 토큰\n// ============================================\nconst colors={light:{primary:\"#000000\",secondary:\"rgba(0, 0, 0, 0.70)\",tertiary:\"rgba(0, 0, 0, 0.56)\"},dark:{primary:\"#FFFFFF\",secondary:\"rgba(255, 255, 255, 0.70)\",tertiary:\"rgba(255, 255, 255, 0.56)\"}};export default function Notice(props){const{theme,deviceType,mode=\"기본\",title=\"유의사항\",noticeItems=[\"\"],paddingMobile=20,paddingDesktop=50}=props;const isDark=theme===\"Dark\";const isMobile=deviceType===\"Mobile\";const padding=isMobile?`${paddingMobile}px`:`${paddingDesktop}px`;const isCollapsible=mode===\"접기\";const[isExpanded,setIsExpanded]=useState(false);useEffect(()=>{if(typeof document!==\"undefined\"){const existingStyle=document.getElementById(\"pretendard-font\");if(!existingStyle){const style=document.createElement(\"style\");style.id=\"pretendard-font\";style.textContent=`\n                    @font-face {\n                        font-family: 'Pretendard';\n                        src: url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/woff2/Pretendard-Regular.woff2') format('woff2');\n                        font-weight: 400;\n                        font-display: swap;\n                    }\n                    @font-face {\n                        font-family: 'Pretendard';\n                        src: url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/woff2/Pretendard-Medium.woff2') format('woff2');\n                        font-weight: 500;\n                        font-display: swap;\n                    }\n                    @font-face {\n                        font-family: 'Pretendard';\n                        src: url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/woff2/Pretendard-Bold.woff2') format('woff2');\n                        font-weight: 700;\n                        font-display: swap;\n                    }\n                `;document.head.appendChild(style);}}},[]);const parseMarkdownBold=text=>{const parts=text.split(/(\\*\\*.*?\\*\\*)/);return parts.map((part,index)=>{if(part.startsWith(\"**\")&&part.endsWith(\"**\")){const boldText=part.slice(2,-2);return /*#__PURE__*/_jsx(\"strong\",{children:boldText},index);}return part;});};const hasTitle=title&&title.trim()!==\"\";const textColor=isDark?colors.dark.tertiary:colors.light.tertiary;const showList=!isCollapsible||isExpanded;return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",color:textColor,paddingLeft:padding,paddingRight:padding,fontFamily:\"Pretendard, -apple-system, BlinkMacSystemFont, sans-serif\",overflow:\"auto\"},children:[hasTitle&&/*#__PURE__*/_jsxs(\"div\",{onClick:isCollapsible?()=>setIsExpanded(!isExpanded):undefined,style:{display:\"flex\",alignItems:\"center\",gap:\"4px\",cursor:isCollapsible?\"pointer\":\"default\"},children:[/*#__PURE__*/_jsx(\"h2\",{style:{fontSize:typography.caption.mobile,fontWeight:600,margin:\"0\",letterSpacing:\"-0.02em\",lineHeight:typography.caption.lineHeight,color:textColor},children:title}),isCollapsible&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"14px\",height:\"14px\"},children:[/*#__PURE__*/_jsx(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",style:{position:\"absolute\",opacity:isExpanded?0:1,transition:\"opacity 0.16s ease-in-out\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M18.6508 9.377 12.0001 16.147l-6.65-6.77\",stroke:textColor,strokeWidth:\"2.7\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})}),/*#__PURE__*/_jsx(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",style:{position:\"absolute\",opacity:isExpanded?1:0,transition:\"opacity 0.16s ease-in-out\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M18.6508 14.6198L12.0001 7.84999L5.34942 14.6198\",stroke:textColor,strokeWidth:\"2.7\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})]})]}),showList&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:\"4px\",marginTop:hasTitle?\"4px\":\"0\"},children:noticeItems.map((item,index)=>{if(!item||item.trim()===\"\")return null;const isIndented=item.trimStart().startsWith(\"-\");const content=isIndented?item.trimStart().slice(1).trimStart():item;const prevIsIndented=index>0&&noticeItems[index-1]?.trimStart().startsWith(\"-\");const needsMargin=!isIndented&&index>0&&!prevIsIndented;return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"flex-start\",gap:\"4px\",marginTop:needsMargin?\"0\":\"0\"},children:[isIndented?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"span\",{style:{fontSize:typography.caption.mobile,lineHeight:typography.caption.lineHeight,visibility:\"hidden\",flexShrink:0},children:\"•\"}),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:typography.caption.mobile,lineHeight:typography.caption.lineHeight,flexShrink:0,userSelect:\"none\"},children:\"◦\"})]}):/*#__PURE__*/_jsx(\"span\",{style:{fontSize:typography.caption.mobile,lineHeight:typography.caption.lineHeight,flexShrink:0,userSelect:\"none\"},children:\"•\"}),/*#__PURE__*/_jsx(\"div\",{style:{flex:1,fontSize:typography.caption.mobile,fontWeight:typography.caption.weight,lineHeight:typography.caption.lineHeight,wordWrap:\"break-word\",overflowWrap:\"break-word\"},children:/*#__PURE__*/_jsx(\"div\",{style:{color:textColor,whiteSpace:\"pre-wrap\"},children:parseMarkdownBold(content)})})]},index);})})]});}Notice.defaultProps={noticeItems:[],theme:\"Light\",deviceType:\"Mobile\",mode:\"기본\",title:\"유의사항\",paddingMobile:20,paddingDesktop:50};addPropertyControls(Notice,{deviceType:{type:ControlType.Enum,title:\"레이아웃\",options:[\"Mobile\",\"Desktop\"],optionTitles:[\"Mobile\",\"Desktop\"],defaultValue:\"Mobile\",displaySegmentedControl:true},theme:{type:ControlType.Enum,title:\"테마\",options:[\"Light\",\"Dark\"],optionTitles:[\"Light\",\"Dark\"],defaultValue:\"Light\",displaySegmentedControl:true},mode:{type:ControlType.Enum,title:\"모드\",options:[\"기본\",\"접기\"],optionTitles:[\"기본\",\"접기\"],defaultValue:\"기본\",displaySegmentedControl:true},title:{type:ControlType.String,title:\"타이틀\",defaultValue:\"유의사항\"},noticeItems:{type:ControlType.Array,title:\"목록\",control:{type:ControlType.String,displayTextArea:true},description:\"항목 앞에 - 를 입력하면 두 번째 위계가 생성됩니다\",defaultValue:[\"첫번째 위계\",\"- 두번째 위계\",\"첫번째 위계\"]},paddingMobile:{type:ControlType.Number,title:\"좌우 패딩 (Mobile)\",defaultValue:20,min:0,step:1,displayStepper:true},paddingDesktop:{type:ControlType.Number,title:\"좌우 패딩 (Desktop)\",defaultValue:50,min:0,step:1,displayStepper:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Notice\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Notice.map"],"mappings":"+LAM4M,SAAwB,EAAO,EAAM,CAAC,GAAK,CAAC,QAAM,aAAW,OAAK,KAAK,QAAM,OAAO,cAAY,CAAC,GAAG,CAAC,gBAAc,GAAG,iBAAe,IAAI,EAAY,EAAO,IAAQ,OAAkD,EAA5B,IAAa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