{"version":3,"file":"ContentCardOverrides.LL0J9ftl.mjs","names":["useState","Tabs","useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/BF4uQ0znplYxYhqhyoUU/m5tqMQ9S76kA6hCT3UPa/Tabs.js","https:/framer.com/m/Tabs-Jv8U.js@m5tqMQ9S76kA6hCT3UPa","https:/framerusercontent.com/modules/IZtLbV1bxHk2HEdScSyU/0TPzRToIatjr3DvNuQOL/ContentDetailModal.js","https:/framer.com/m/ContentDetailModal-MFww.js@0TPzRToIatjr3DvNuQOL","https:/framerusercontent.com/modules/K8lBPtHipAZRvas9Ql1h/3Jmw8nmpbmmWjDF61hlL/ContentCardOverrides.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";const Tabs=({tabs,value,onChange})=>{// --- 개별 탭 아이템 스타일 ---\nconst getTabStyle=isActive=>{const baseStyle={padding:\"8px\",cursor:\"pointer\",outline:\"none\",fontSize:\"16px\",color:\"#888\",border:\"none\",width:\"100%\",borderRadius:\"8px\"};const activeStyle={color:\"#343840\",backgroundColor:\"#fff\"};return isActive?{...baseStyle,...activeStyle}:baseStyle;};// --- 탭 컨테이너 스타일 ---\nconst containerStyle={display:\"flex\",borderRadius:\"12px\",backgroundColor:\"#eef0f1\",padding:\"4px\"};return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:tabs.map(tab=>/*#__PURE__*/_jsx(\"button\",{style:getTabStyle(tab.value===value),onClick:()=>onChange(tab.value),children:tab.label},tab.value))});};export default Tabs;\nexport const __FramerMetadata__ = {\"exports\":{\"TabItem\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Tabs.map","/*\n * Tabs\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/BF4uQ0znplYxYhqhyoUU/m5tqMQ9S76kA6hCT3UPa/Tabs.js\"\nexport { default } from \"https://framerusercontent.com/modules/BF4uQ0znplYxYhqhyoUU/m5tqMQ9S76kA6hCT3UPa/Tabs.js\"\n","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{Frame}from\"framer\";import{useMediaQuery}from\"https://framer.com/m/useMediaQuery-tP0a.js@tuK11rNDnUXj2AaJaWyR\";import{Typography}from\"https://framer.com/m/Typography-PjoG.js@SyDtK0LicJA0WCtDdRGu\";import Tabs from\"https://framer.com/m/Tabs-Jv8U.js@m5tqMQ9S76kA6hCT3UPa\";import{Spinner}from\"https://framer.com/m/Spinner-hibE.js@zZpYryiNgzAIfJ9o3kTl\";import{useLockBodyScroll}from\"https://framer.com/m/UseLockBodyScroll-7L3z.js@XGmoW4JYvXf4xkHdldfF\";export default function ContentDetailModal({selectedId,onClose}){useLockBodyScroll(selectedId);const{isMobile,isTablet,isDesktop}=useMediaQuery();const[type,setType]=useState(\"content\");const[data,setData]=useState();const[loading,setLoading]=useState(false);useEffect(()=>{if(!selectedId||isNaN(selectedId))return;const fetchData=async()=>{setLoading(true);try{const response=await fetch(`https://api.engall.co/api/v1/content/content/read/${selectedId}`,{method:\"GET\",headers:{Authorization:\"Bearer anonymous\"}});const result=await response.json();setData(result);}catch(error){console.error(\"Data fetching failed:\",error);}finally{setLoading(false);}};fetchData();},[selectedId]);const handleClose=()=>{onClose();};if(!data)return null;const imageUrl=data?.image_file_url?.length>0?data?.image_file_url:\"https://via.placeholder.com/1000x400.png?text=No+Image\";const contentLevel=data?.min_level===data?.max_level?`Level. ${data?.min_level}`:`Level. ${data?.min_level}-${data?.max_level}`;const appendIconToContentFormatName=contentFormatName=>{if(!contentFormatName)return\"\";const _contentFormatName=contentFormatName.replace(\"-\",\"/\");const iconMap={\"lesson-lecture\":\"📚\",\"article-story\":\"🗞️\",\"conversation-debate\":\"🗣️\",dialogue:\"💬\",\"practice-quiz\":\"🏃\"};return`${iconMap[contentFormatName]} ${_contentFormatName}`;};const tabItems=[{label:\"콘텐츠\",value:\"content\"},{label:\"학습 자료\",value:\"material\"}];if(loading){return /*#__PURE__*/_jsx(Frame,{background:\"rgba(0, 0, 0, 0.5)\",width:\"100%\",height:\"100%\",style:{position:\"fixed\",top:0,left:0,zIndex:100,display:\"flex\",justifyContent:\"center\",alignItems:\"center\"},onClick:handleClose,children:/*#__PURE__*/_jsx(\"div\",{className:\"modal-scroll\",style:{backgroundColor:\"#fff\",height:\"80vh\",width:isDesktop?800:\"90vw\",borderRadius:10,boxShadow:\"0 5px 15px rgba(0, 0, 0, 0.2)\",overflowY:\"auto\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\"},onClick:e=>e.stopPropagation(),children:/*#__PURE__*/_jsx(Spinner,{})})});}return /*#__PURE__*/_jsxs(Frame,{background:\"rgba(0, 0, 0, 0.5)\",width:\"100%\",height:\"100%\",style:{position:\"fixed\",top:0,left:0,zIndex:100,display:\"flex\",justifyContent:\"center\",alignItems:\"center\"},onClick:handleClose,children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .modal-scroll {\n                overflow-y: auto;\n                -webkit-overflow-scrolling: touch;\n                -ms-overflow-style: none;  /* IE, Edge */\n                scrollbar-width: none;     /* Firefox */\n                }\n                .modal-scroll::-webkit-scrollbar {\n                display: none;  /* Chrome, Safari */\n                width: 0;\n                height: 0;\n                }\n            `}),/*#__PURE__*/_jsx(\"div\",{className:\"modal-scroll\",style:{backgroundColor:\"#fff\",height:\"80vh\",width:isDesktop?800:\"90vw\",borderRadius:10,boxShadow:\"0 5px 15px rgba(0, 0, 0, 0.2)\",overflowY:\"auto\"},onClick:e=>e.stopPropagation(),children:/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",justifyContent:\"end\",position:\"sticky\",top:0,zIndex:10,backgroundColor:\"#fff\",padding:\"10px 16px\"},children:/*#__PURE__*/_jsx(\"button\",{onClick:handleClose,style:{background:\"none\",border:\"none\",fontSize:\"1px\",cursor:\"pointer\",color:\"#6c757d\"},children:/*#__PURE__*/_jsx(Typography,{fontSize:\"14px\",color:\"#6c757d\",fontWeight:500,children:\"닫기\"})})}),/*#__PURE__*/_jsxs(\"div\",{style:{padding:\"16px\",display:\"flex\",flexDirection:\"column\",gap:\"24px\",height:\"100%\"},children:[/*#__PURE__*/_jsx(\"img\",{src:imageUrl,alt:data.title,style:{width:\"100%\",height:isDesktop?\"260px\":\"120px\",objectFit:\"cover\",display:\"block\",borderRadius:\"16px\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:\"8px\",alignItems:\"center\"},children:[/*#__PURE__*/_jsx(Typography,{fontWeight:500,color:\"#4f555c\",children:contentLevel}),/*#__PURE__*/_jsx(\"div\",{style:{backgroundColor:\"#e7ebee\",height:\"16px\",width:\"1px\"}}),/*#__PURE__*/_jsx(Typography,{fontWeight:500,color:\"#4f555c\",children:appendIconToContentFormatName(data?.content_format?.name)})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",flex:\"1 1 0%\"},children:[/*#__PURE__*/_jsx(Typography,{fontWeight:700,children:data.title}),/*#__PURE__*/_jsx(Typography,{fontWeight:500,color:\"#4f555c\",children:data.korean_title})]}),/*#__PURE__*/_jsx(Tabs,{tabs:tabItems,value:type,onChange:setType}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:isDesktop?\"24px\":\"16px\",height:\"100%\"},children:[/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                                .rendered-article {\n                                    -webkit-user-select: none; /* Chrome, Safari */\n                                    -moz-user-select: none;    /* Firefox */\n                                    -ms-user-select: none;     /* IE/Edge 구버전 */\n                                    user-select: none;\n                                }\n                                .rendered-article blockquote {\n                                    margin: 0;\n                                    border: 1px solid #ebecf0;\n                                    box-shadow: 2px 4px 24px -8px #1630521f;\n                                    padding: 12px;\n                                    border-radius: 16px;\n                                    font-size: 16px;\n                                }\n                                .rendered-article h5 {\n                                font-size: 18px\n                                }\n                                .rendered-article blockquote > p {\n                                    font-size: 16px;\n                                    line-height: 1.8;\n                                }\n                                .rendered-article ol {\n                                    margin: 0;\n                                    padding: 0 0 0 24px;\n                                    list-style: decimal;\n                                }\n                            `}),type===\"content\"&&/*#__PURE__*/_jsx(\"article\",{className:\"rendered-article\",style:{fontSize:\"16px\",whiteSpace:\"pre-wrap\"},dangerouslySetInnerHTML:{__html:data.body_rendered}}),type===\"material\"&&(data.note_rendered?/*#__PURE__*/_jsx(\"article\",{className:\"rendered-article\",style:{whiteSpace:\"pre-wrap\"},dangerouslySetInnerHTML:{__html:data.note_rendered}}):/*#__PURE__*/_jsx(Typography,{textAlign:\"center\",fontWeight:500,color:\"#4f555c\",children:\"해당 콘텐츠는 학습 자료가 없습니다.\"}))]}),/*#__PURE__*/_jsxs(\"div\",{style:{backgroundColor:\"#f6f7f9\",padding:\"16px\",borderRadius:\"0.5rem\"},children:[/*#__PURE__*/_jsx(Typography,{fontSize:14,fontWeight:500,color:\"#4f555c\",children:\"레벨에 적절하지 않은 컨텐츠를 선택하실 경우, 튜터가 수업 도중 레벨에 맞는 자료로 변경하여 수업을 진행할 수 있습니다.\"}),/*#__PURE__*/_jsx(Typography,{fontSize:12,fontWeight:500,color:\"#9ca6af\",children:\"Copyright ⓒ EngAll. All Rights Reserved.\"})]})]})]})]})})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ContentDetailModal\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ContentDetailModal.map","/*\n * ContentDetailModal\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/IZtLbV1bxHk2HEdScSyU/0TPzRToIatjr3DvNuQOL/ContentDetailModal.js\"\nexport { default } from \"https://framerusercontent.com/modules/IZtLbV1bxHk2HEdScSyU/0TPzRToIatjr3DvNuQOL/ContentDetailModal.js\"\n","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{forwardRef,useState}from\"react\";import ContentDetailModal from\"https://framer.com/m/ContentDetailModal-MFww.js@0TPzRToIatjr3DvNuQOL\";export const withCardClick=Component=>{return /*#__PURE__*/forwardRef((props,ref)=>{const[selectedContentId,setSelectedContentId]=useState(null);const onTap=()=>{// props에 포함된 'data-framer-name' (레이어의 frame 이름)을 ID로 사용합니다.\nconst layerName=props[\"data-framer-name\"];if(layerName){setSelectedContentId(Number(layerName));}else{console.error(\"Layer has no name. Please name the layer in the Layers panel.\");}};const handleClose=()=>{setSelectedContentId(null);};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Component,{ref:ref,...props,onTap:onTap,cursor:\"pointer\"}),selectedContentId&&/*#__PURE__*/_jsx(ContentDetailModal,{selectedId:selectedContentId,onClose:handleClose})]});});};\nexport const __FramerMetadata__ = {\"exports\":{\"withCardClick\":{\"type\":\"reactHoc\",\"name\":\"withCardClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ContentCardOverrides.map"],"mappings":"qVAA2C,CAAM,GAAM,CAAC,OAAK,QAAM,cAAY,CAC/E,IAAM,EAAY,GAAU,CAAC,IAAM,EAAU,CAAC,QAAQ,MAAM,OAAO,UAAU,QAAQ,OAAO,SAAS,OAAO,MAAM,OAAO,OAAO,OAAO,MAAM,OAAO,aAAa,MAAM,CAAO,EAAY,CAAC,MAAM,UAAU,gBAAgB,OAAO,CAAC,OAAO,EAAS,CAAC,GAAG,EAAU,GAAG,EAAY,CAAC,GAC/K,OAAoB,EAAK,MAAM,CAAC,MAA7G,CAAC,QAAQ,OAAO,aAAa,OAAO,gBAAgB,UAAU,QAAQ,MAAM,CAAsD,SAAS,EAAK,IAAI,GAAkB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