{"version":3,"file":"IcelandicDate.DF5ApU05.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/RZVVXgDULb5lJTTIs2WO/rFd5YKwfz4svAkFQ7A9i/IcelandicDate.js"],"sourcesContent":["// Date display component with Icelandic locale and text style props\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Icelandic Date Display\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function IcelandicDate(props){const{date,format,monthFormat,dayFormat,font,color,style}=props;const formatted=useMemo(()=>{if(!date)return\"—\";try{const d=new Date(date);const monthsFull=[\"jan\\xfaar\",\"febr\\xfaar\",\"mars\",\"apr\\xedl\",\"ma\\xed\",\"j\\xfan\\xed\",\"j\\xfal\\xed\",\"\\xe1g\\xfast\",\"september\",\"okt\\xf3ber\",\"n\\xf3vember\",\"desember\"];const monthsShort=[\"jan\",\"feb\",\"mar\",\"apr\",\"ma\\xed\",\"j\\xfan\",\"j\\xfal\",\"\\xe1g\\xfa\",\"sep\",\"okt\",\"n\\xf3v\",\"des\"];const dayNames=[\"Sunnudagur\",\"M\\xe1nudagur\",\"\\xderi\\xf0judagur\",\"Mi\\xf0vikudagur\",\"Fimmtudagur\",\"F\\xf6studagur\",\"Laugardagur\"];const months=monthFormat===\"short\"?monthsShort:monthsFull;const dayNumber=String(d.getDate()).padStart(2,\"0\");const dayName=dayNames[d.getDay()];const day=dayFormat===\"name\"?dayName:dayNumber;const month=d.getMonth();const monthNumber=String(d.getMonth()+1).padStart(2,\"0\");const monthDisplay=monthFormat===\"number\"?monthNumber:months[month];const year=d.getFullYear();if(format===\"fullDate\"){return dayFormat===\"name\"?`${day}, ${dayNumber}. ${monthDisplay} ${year}`:`${day}. ${monthDisplay} ${year}`;}else if(format===\"day\"){return`${day}`;}else if(format===\"month\"){return monthDisplay;}else if(format===\"year\"){return`${year}`;}else if(format===\"dayMonth\"){return dayFormat===\"name\"?`${day}, ${dayNumber}. ${monthDisplay}`:`${day}. ${monthDisplay}`;}else if(format===\"monthYear\"){return`${monthDisplay} ${year}`;}else{return dayFormat===\"name\"?`${day}, ${dayNumber}. ${monthDisplay} ${year}`:`${day}. ${monthDisplay} ${year}`;}}catch{return\"—\";}},[date,format,monthFormat,dayFormat]);return /*#__PURE__*/_jsx(\"span\",{style:{...font,color,...style,width:\"max-content\",display:\"inline-block\"},lang:\"is\",\"aria-label\":formatted,children:formatted});}addPropertyControls(IcelandicDate,{date:{type:ControlType.Date,title:\"Date\",displayTime:false,defaultValue:new Date().toJSON()},format:{type:ControlType.Enum,title:\"Format\",options:[\"fullDate\",\"day\",\"month\",\"year\",\"dayMonth\",\"monthYear\"],optionTitles:[\"Full Date\",\"Day\",\"Month\",\"Year\",\"Day & Month\",\"Month & Year\"],defaultValue:\"fullDate\"},dayFormat:{type:ControlType.Enum,title:\"Day Format\",options:[\"number\",\"name\"],optionTitles:[\"Number\",\"Day Name\"],defaultValue:\"number\",displaySegmentedControl:true,hidden:({format})=>format===\"month\"||format===\"year\"||format===\"monthYear\"},monthFormat:{type:ControlType.Enum,title:\"Month Format\",options:[\"full\",\"short\",\"number\"],optionTitles:[\"Full Name\",\"3 Letters\",\"Number\"],defaultValue:\"full\",displaySegmentedControl:true,hidden:({format})=>format===\"day\"||format===\"year\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"22px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},color:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"IcelandicDate\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./IcelandicDate.map"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