{"version":3,"file":"AutoYearCopyright.e57HvvsZ.mjs","names":[],"sources":["https:/framerusercontent.com/modules/Jz6H7HFQhTchUp6uXcdd/cFlll3r6K2GJ989rkdXR/AutoYearCopyright.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function AutoYearCopyright(props){const{companyName,rightsText,showSymbol,showTrademark,trademarkType,yearPlacement,font,color,fontSize,textAlign,style}=props;const currentYear=new Date().getFullYear();const symbol=showSymbol===\"yes\"?\"\\xa9\":\"\";const trademarkOptionActive=showTrademark===\"yes\";const trademarkSymbol=trademarkOptionActive?trademarkType===\"trademark\"?\"™\":\"\\xae\":\"\";let finalCompanyName=companyName.trim();let finalRightsText=rightsText.trim();let dotAfterCompanyName=\"\";if(yearPlacement===\"beforeCompanyName\"){finalCompanyName=`${currentYear} ${finalCompanyName}`;}else if(yearPlacement===\"afterCompanyName\"&&finalCompanyName){finalCompanyName+=` ${currentYear}`;}else if(yearPlacement===\"beforeRightsText\"&&finalRightsText){finalRightsText=`${currentYear}. ${finalRightsText}`;}else if(yearPlacement===\"afterRightsText\"&&finalRightsText){finalRightsText+=` ${currentYear}`;dotAfterCompanyName=!trademarkOptionActive&&finalCompanyName&&finalRightsText?\".\":\"\";}else if(!finalCompanyName&&!finalRightsText){finalCompanyName=`${currentYear}`;}finalCompanyName+=trademarkSymbol?`${trademarkSymbol}`:\"\";let displayText=symbol?`${symbol} `:\"\";displayText+=finalCompanyName?`${finalCompanyName}${dotAfterCompanyName}`:\"\";if(finalCompanyName&&finalRightsText)displayText+=\" \";displayText+=finalRightsText;const justifyContent=textAlign===\"center\"?\"center\":textAlign===\"right\"?\"flex-end\":\"flex-start\";const rootStyle={...style,display:\"flex\",justifyContent,alignItems:\"flex-start\",boxSizing:\"border-box\",/**\n         * Important:\n         * If Framer gives the component a width, respect it.\n         * This is what makes Fill + alignment work.\n         *\n         * If Framer does not give a width, use max-content.\n         * This is what keeps Fit Content on one line.\n         */width:style?.width??\"max-content\",maxWidth:\"100%\",minWidth:0};const textStyle={display:\"block\",boxSizing:\"border-box\",/**\n         * Keeps Fit Content measuring as a single-line text width,\n         * but allows wrapping when the outer component is genuinely constrained.\n         */width:\"max-content\",maxWidth:\"100%\",whiteSpace:\"normal\",overflowWrap:\"normal\",wordBreak:\"normal\",fontSize:`${fontSize}px`,color,textAlign,...font};return /*#__PURE__*/_jsx(\"div\",{style:rootStyle,children:/*#__PURE__*/_jsx(\"span\",{style:textStyle,children:displayText.trim()})});}AutoYearCopyright.defaultProps={companyName:\"Company Name\",rightsText:\"All rights reserved\",showSymbol:\"yes\",showTrademark:\"no\",trademarkType:\"trademark\",yearPlacement:\"afterRightsText\",color:\"#999999\",fontSize:18,textAlign:\"left\",font:{family:\"Inter\"}};addPropertyControls(AutoYearCopyright,{font:{type:ControlType.Font,title:\"Font\",defaultValue:\"Inter\",controls:\"extended\"},color:{type:ControlType.Color,title:\"Font Color\",defaultValue:\"#999999\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:18,min:1,max:200,step:1},textAlign:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"left\",displaySegmentedControl:true},companyName:{type:ControlType.String,title:\"Company Name\",defaultValue:\"Company Name\"},rightsText:{type:ControlType.String,title:\"Rights Text\",defaultValue:\"All rights reserved\"},showSymbol:{type:ControlType.SegmentedEnum,title:\"Symbol\",options:[\"yes\",\"no\"],optionTitles:[\"Yes\",\"No\"],defaultValue:\"yes\"},showTrademark:{type:ControlType.SegmentedEnum,title:\"Trademark\",options:[\"yes\",\"no\"],optionTitles:[\"Yes\",\"No\"],defaultValue:\"no\"},trademarkType:{type:ControlType.Enum,title:\"Type\",options:[\"trademark\",\"registered\"],optionTitles:[\"Trademark\",\"Registered\"],defaultValue:\"trademark\",hidden:({showTrademark})=>showTrademark!==\"yes\"},yearPlacement:{type:ControlType.Enum,title:\"Year\",options:[\"beforeCompanyName\",\"afterCompanyName\",\"beforeRightsText\",\"afterRightsText\"],optionTitles:[\"Before Company\",\"After Company\",\"Before Rights\",\"After Rights\"],defaultValue:\"afterRightsText\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AutoYearCopyright\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerDisableUnlink\":\"*\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AutoYearCopyright.map"],"mappings":"4JAKG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,cAAY,aAAW,aAAW,gBAAc,gBAAc,gBAAc,OAAK,QAAM,WAAS,YAAU,SAAO,EAAY,EAAY,IAAI,KAAK,CAAA,CAAE,YAAY,EAAQ,EAAO,IAAa,MAAM,IAAO,GAAS,EAAsB,IAAgB,MAAY,EAAgB,EAAsB,IAAgB,YAAY,IAAI,IAAO,GAAO,EAAiB,EAAY,KAAK,EAAM,EAAgB,EAAW,KAAK,EAAM,EAAoB,GAAM,IAAgB,oBAAqB,EAAiB,GAAG,EAAY,GAAG,IAA4B,IAAgB,oBAAoB,EAAkB,GAAkB,IAAI,IAAuB,IAAgB,oBAAoB,EAAiB,EAAgB,GAAG,EAAY,IAAI,IAA2B,IAAgB,mBAAmB,GAAiB,GAAiB,IAAI,IAAc,EAAoB,CAAC,GAAuB,GAAkB,EAAgB,IAAI,IAAY,CAAC,GAAkB,CAAC,IAAiB,EAAiB,GAAG,KAAe,GAAkB,EAAgB,GAAG,IAAkB,GAAG,IAAI,EAAY,EAAO,GAAG,EAAO,GAAG,GAAG,GAAa,EAAiB,GAAG,IAAmB,IAAsB,GAAM,GAAkB,IAAgB,G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