{"version":3,"file":"SaleGrid.B2xmDUCG.mjs","names":["React.Fragment","__esmMin","init_npm_react_18_3_1","x","p","c","init_jsx_runtime","init_framer_CKT6jEEQ","addPropertyControls","ControlType","getSrc","image","isVisible","item","hasName","hasImage","SaleGrid","props","visibleItems","items","style","columnsDesktop","accentColor","bodyFont","mutedColor","titleFont","cardTextColor","src","card","i","footerNote","init_SaleGrid"],"sources":["https:/framerusercontent.com/modules/3ca3AzNOfhRQxccvmkl4/cxEJ1vudjgeoCgfbvrSJ/SaleGrid.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";function getSrc(image){if(!image)return undefined;return typeof image===\"string\"?image:image.src;}// An item shows unless it's been switched off, or it's an empty row.\n// Items saved before this toggle existed have no \"available\" value, so they\n// count as on — nothing currently on the page disappears after the update.\nfunction isVisible(item){if(!item)return false;if(item.available===false)return false;const hasName=!!(item.name&&item.name.trim());const hasImage=!!getSrc(item.image);return hasName||hasImage;}export default function SaleGrid(props){const{items=[],footerNote,background,cardTextColor,mutedColor,accentColor,titleFont,bodyFont,columnsDesktop,style}=props;const visibleItems=(Array.isArray(items)?items:[]).filter(isVisible);return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",background,boxSizing:\"border-box\",padding:\"clamp(24px, 4vw, 48px) 0\",...style},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .sale-grid {\n                    display: grid;\n                    grid-template-columns: repeat(${columnsDesktop}, 1fr);\n                    gap: clamp(16px, 2.5vw, 24px);\n                }\n                @media (max-width: 810px) {\n                    .sale-grid { grid-template-columns: repeat(2, 1fr); }\n                }\n                @media (max-width: 480px) {\n                    .sale-grid { grid-template-columns: 1fr; }\n                }\n                .sale-card-image {\n                    width: 100%;\n                    aspect-ratio: 1 / 1;\n                    border-radius: 4px;\n                    background-size: contain;\n                    background-repeat: no-repeat;\n                    background-position: center;\n                    background-color: #FFFFFF;\n                    margin-bottom: 16px;\n                    position: relative;\n                }\n                .sale-card-badge {\n                    position: absolute;\n                    top: 14px;\n                    left: 14px;\n                    background: ${accentColor};\n                    color: #141310;\n                    font-family: ${bodyFont};\n                    font-size: 12px;\n                    font-weight: 700;\n                    letter-spacing: 0.04em;\n                    text-transform: uppercase;\n                    padding: 7px 14px;\n                    border-radius: 30px;\n                }\n                .sale-card-top-row {\n                    display: flex;\n                    justify-content: space-between;\n                    align-items: baseline;\n                    gap: 10px;\n                }\n                .sale-card-category {\n                    font-family: ${bodyFont};\n                    color: ${mutedColor};\n                    font-size: 12px;\n                    letter-spacing: 0.08em;\n                    text-transform: uppercase;\n                    margin: 4px 0 0;\n                }\n                .sale-card-name {\n                    font-family: ${titleFont};\n                    font-weight: 600;\n                    color: ${cardTextColor};\n                    font-size: clamp(15px, 1.5vw, 17px);\n                    margin: 0;\n                    line-height: 1.35;\n                }\n                .sale-card-price {\n                    font-family: ${bodyFont};\n                    font-size: 14px;\n                    white-space: nowrap;\n                    margin-top: 10px;\n                }\n                .sale-card-price-original {\n                    color: ${mutedColor};\n                    text-decoration: line-through;\n                    margin-right: 8px;\n                }\n                .sale-card-price-sale {\n                    color: ${accentColor};\n                    font-weight: 600;\n                }\n                .sale-card-link {\n                    text-decoration: none;\n                    display: block;\n                }\n                .sale-footer-note {\n                    text-align: center;\n                    color: ${mutedColor};\n                    font-family: ${bodyFont};\n                    font-size: 11px;\n                    margin-top: clamp(24px, 4vw, 40px);\n                }\n            `}),/*#__PURE__*/_jsx(\"div\",{className:\"sale-grid\",children:visibleItems.map((item,i)=>{const src=getSrc(item.image);const card=/*#__PURE__*/_jsxs(React.Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{className:\"sale-card-image\",style:src?{backgroundImage:`url(${src})`}:undefined,children:item.badge&&/*#__PURE__*/_jsx(\"span\",{className:\"sale-card-badge\",children:item.badge})}),/*#__PURE__*/_jsxs(\"div\",{className:\"sale-card-top-row\",children:[/*#__PURE__*/_jsx(\"p\",{className:\"sale-card-name\",children:item.name}),/*#__PURE__*/_jsxs(\"span\",{className:\"sale-card-price\",children:[item.originalPrice&&/*#__PURE__*/_jsx(\"span\",{className:\"sale-card-price-original\",children:item.originalPrice}),/*#__PURE__*/_jsx(\"span\",{className:\"sale-card-price-sale\",children:item.salePrice})]})]}),item.category&&/*#__PURE__*/_jsx(\"p\",{className:\"sale-card-category\",children:item.category})]});return item.link?/*#__PURE__*/_jsx(\"a\",{className:\"sale-card-link\",href:item.link,children:card},i):/*#__PURE__*/_jsx(\"div\",{children:card},i);})}),footerNote&&/*#__PURE__*/_jsx(\"p\",{className:\"sale-footer-note\",children:footerNote})]});}SaleGrid.defaultProps={background:\"#141310\",cardTextColor:\"#F7F4EB\",mutedColor:\"#7d7a6f\",accentColor:\"#FF5C33\",titleFont:\"'Cabinet Grotesk', sans-serif\",bodyFont:\"'Switzer', sans-serif\",columnsDesktop:3,footerNote:\"That's everything on sale right now — check back soon for more.\",items:[{image:\"\",badge:\"20% OFF\",category:\"Hybrid \\xb7 3.5g\",name:\"Baby Jeeter Pre-Rolls\",originalPrice:\"$40\",salePrice:\"$32\",link:\"\",available:true},{image:\"\",badge:\"15% OFF\",category:\"Indica-dominant \\xb7 7g\",name:\"Live Soil Zkittlez\",originalPrice:\"$60\",salePrice:\"$51\",link:\"\",available:true},{image:\"\",badge:\"25% OFF\",category:\"Hybrid \\xb7 Cartridge\",name:\"Muha Med x Cookies\",originalPrice:\"$45\",salePrice:\"$34\",link:\"\",available:true}]};addPropertyControls(SaleGrid,{items:{type:ControlType.Array,title:\"Items\",description:\"Toggle an item to Hidden to take it off the page without losing it. Delete the row to remove it for good.\",control:{type:ControlType.Object,controls:{available:{type:ControlType.Boolean,title:\"On sale\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"Hidden\",description:\"Turn off to hide this item from the sale page without deleting it — flip back on to show it again.\"},image:{type:ControlType.ResponsiveImage,title:\"Photo\"},badge:{type:ControlType.String,title:\"Discount label\",defaultValue:\"20% OFF\"},category:{type:ControlType.String,title:\"Category\",defaultValue:\"\"},name:{type:ControlType.String,title:\"Product name\",defaultValue:\"New product\"},originalPrice:{type:ControlType.String,title:\"Original price\",defaultValue:\"$0\"},salePrice:{type:ControlType.String,title:\"Sale price\",defaultValue:\"$0\"},link:{type:ControlType.Link,title:\"Link\"}}}},footerNote:{type:ControlType.String,title:\"Footer note\",displayTextArea:true},columnsDesktop:{type:ControlType.Number,title:\"Columns\",defaultValue:3,min:1,max:4,step:1},background:{type:ControlType.Color,title:\"Background\"},cardTextColor:{type:ControlType.Color,title:\"Name color\"},mutedColor:{type:ControlType.Color,title:\"Muted color\"},accentColor:{type:ControlType.Color,title:\"Accent color\"},titleFont:{type:ControlType.String,title:\"Title font\"},bodyFont:{type:ControlType.String,title:\"Body font\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SaleGrid\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SaleGrid.map"],"mappings":"A,iLAAyI,SAASU,EAAO,EAAM,CAAC,GAAIC,EAAuB,OAAO,OAAOA,GAAQ,SAASA,EAAMA,EAAM,GAAI,CAG1O,SAASC,EAAU,EAAK,CAAuB,GAAnB,CAACC,GAAqBA,EAAK,YAAY,GAAM,MAAO,GAAM,IAAMC,EAAQ,CAAC,EAAED,EAAK,MAAMA,EAAK,KAAK,KAAK,GAASE,EAAS,CAAC,CAACL,EAAOG,EAAK,KAAK,EAAE,OAAOC,GAASC,CAAS,CAAC,SAAwBC,EAAS,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,EAAE,aAAW,aAAW,gBAAc,aAAW,cAAY,YAAU,WAAS,iBAAe,SAAOC,EAAYC,GAAc,MAAM,QAAQC,CAAK,EAAEA,EAAM,CAAC,EAAA,CAAG,OAAOP,CAAS,EAAE,MAAoB,gBAAM,MAAM,CAAC,MAAM,CAAC,MAAM,O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