{"version":3,"file":"LotCard.BMgzAVQ6.mjs","names":["__esmMin","p","c","init_jsx_runtime","addPropertyControls","init_framer_BL9pqxmF","languageControl","money","urlList","useLang","useLinkProps","num","init_BidBidTheme","Img","LOT_CSS","ar","Icon","Root","fmtDate","LotCard","lang","props","lp","L","k","img","sold","when","CSS","init_LotCard","ControlType","extra"],"sources":["https:/framerusercontent.com/modules/3wBnCK88DvGNznDP8PUc/liJ4I3JfV1XS2jVOzv6p/LotCard.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{Root,useLang,ar,languageControl,useLinkProps,Icon,Img,LOT_CSS,money,num,fmtDate,urlList}from\"https://framerusercontent.com/modules/ac9f13wiItglPkAXsAzE/J3eA00sDAiPANMjy9BEN/BidBidTheme.js\";const CSS=LOT_CSS+`\n.bb.bb-lotcard{height:100%}\n.bb .lot-card{height:100%}\n.bb .lot-img .lot-sold{position:absolute;top:10px;inset-inline-start:10px;background:#e8f8ef;color:#197047;font:700 11px \"Poppins\",Arial,sans-serif;padding:5px 10px;border-radius:999px;display:inline-flex;gap:5px;align-items:center}\n.bb[dir=rtl] .lot-img .lot-sold{font-family:\"Noto Kufi Arabic\",Tahoma,Arial,sans-serif}\n.bb .lot-img .lot-sold .bi-svg{width:12px;height:12px}\n`;/**\n * One lot from the Lots CMS collection. Put it in a Collection List → Lots\n * (on the auction page: filtered to this auction, sorted by Lot No).\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 300\n */export default function LotCard(props){const lang=useLang(props.language);const lp=useLinkProps();const L=k=>lang===\"ar\"?ar(k):k;const img=props.cover?.src?props.cover:urlList(props.coverUrl).find(Boolean);const sold=num(props.finalPrice)>0;const when=props.closes||props.auctionClosing;return /*#__PURE__*/_jsx(Root,{scope:\"LotCard\",lang:lang,css:CSS,className:\"bb-lotcard\",style:props.style,children:/*#__PURE__*/_jsxs(\"article\",{className:\"lot-card\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"lot-img\",children:[/*#__PURE__*/_jsx(Img,{image:img,alt:props.title,placeholder:\"Cover photo\",sizes:\"(max-width: 700px) 100vw, 320px\"}),sold&&/*#__PURE__*/_jsxs(\"span\",{className:\"lot-sold\",children:[/*#__PURE__*/_jsx(Icon,{name:\"check-circle-fill\"}),\" \",L(\"Sold\")]})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"lot-body\",children:[props.lotNo!==\"\"&&props.lotNo!=null&&/*#__PURE__*/_jsxs(\"span\",{className:\"lot-no\",children:[\"#\",props.lotNo]}),/*#__PURE__*/_jsx(\"h3\",{children:/*#__PURE__*/_jsx(\"bdi\",{children:props.title})}),props.description&&/*#__PURE__*/_jsx(\"p\",{className:\"lot-desc\",children:/*#__PURE__*/_jsx(\"bdi\",{children:props.description})}),when&&!sold&&/*#__PURE__*/_jsxs(\"div\",{className:\"lot-time\",children:[/*#__PURE__*/_jsx(Icon,{name:\"clock\"}),\" \",fmtDate(when,lang)]}),/*#__PURE__*/_jsxs(\"div\",{className:\"lot-fin\",children:[/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"span\",{children:sold?L(\"Final Price\"):L(\"Starting Price\")}),/*#__PURE__*/_jsx(\"strong\",{children:money(sold?props.finalPrice:props.startingPrice)})]}),sold&&props.totalBids?/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"span\",{children:L(\"Total Bids\")}),/*#__PURE__*/_jsx(\"strong\",{children:props.totalBids})]}):props.deposit?/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"span\",{children:L(\"Deposit\")}),/*#__PURE__*/_jsx(\"strong\",{children:money(props.deposit)})]}):null]}),props.link&&/*#__PURE__*/_jsx(\"a\",{className:\"btn secondary\",...lp(props.link),children:L(\"View Details\")})]})]})});}const S=(title,defaultValue=\"\",extra={})=>({type:ControlType.String,title,defaultValue,...extra});addPropertyControls(LotCard,{language:languageControl,lotNo:{type:ControlType.Number,title:\"Lot No\",defaultValue:1,min:0,step:1,displayStepper:true},title:S(\"Title\",\"Toyota Hilux Pickup 2.4L Diesel MT – 2023\"),description:S(\"Description\",\"2023 \\xb7 164,000 km \\xb7 White\",{displayTextArea:true}),cover:{type:ControlType.ResponsiveImage,title:\"Cover\"},coverUrl:S(\"Cover URL\",\"\",{placeholder:\"https://… (if no upload)\"}),startingPrice:S(\"Starting price\",\"7300\"),deposit:S(\"Deposit\",\"\",{description:\"Optional — e.g. connect to the auction's Deposit.\"}),closes:S(\"Closes (ISO)\",\"\",{description:\"This lot's closing time, if it has its own.\"}),auctionClosing:S(\"Auction closing (ISO)\",\"\",{description:\"Optional fallback when the lot has no own closing time.\"}),finalPrice:S(\"Final price\",\"\",{description:\"Filled after closing → card shows Sold + final price.\"}),totalBids:S(\"Total bids\",\"\"),link:{type:ControlType.Link,title:\"Link\",description:\"Connect to the Lots CMS page → Current item.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LotCard\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"300\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"A,mSAaG,SAAwBmB,EAAQ,EAAM,CAAC,IAAMC,EAAKX,EAAQY,EAAM,QAAQ,EAAQC,EAAGZ,EAAa,EAAQa,EAAE,GAAGH,IAAO,KAAKL,EAAGS,CAAC,EAAEA,EAAQC,EAAIJ,EAAM,OAAO,IAAIA,EAAM,MAAMb,EAAQa,EAAM,QAAQ,CAAC,CAAC,KAAK,OAAO,EAAQK,EAAKf,EAAIU,EAAM,UAAU,EAAE,EAAQM,EAAKN,EAAM,QAAQA,EAAM,eAAe,MAAoB,gBAAKJ,EAAK,CAAC,MAAM,UAAe,OAAK,IAAIW,EAA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