PageSourceSearch

https://muralsng.lovable.app/assets/InvestmentCataloguePage-DCiTWqCo.js

js muralsng.lovable.app collected 2026-10-03 03:33:59 UTC 7,595 bytes, 1 lines download raw bytes

1import{r as b,j as e,z as y,q as N,y as v,L as k}from"./index-Do8CqlP5.js";import{u as w}from"./useShopifyProducts-B_3f7He9.js";import{i as I,I as S}from"./InquiryModal-CBUbNsmY.js";import{u as C}from"./useScrollReveal-BBzQmALs.js";import"./dialog-D_oRImtm.js";import"./input-9XAfdtQI.js";import"./label-BxLokWOH.js";import"./circle-check-big-B05n5PFz.js";function F(s){for(const r of s.tags||[])if(r.toLowerCase().trim().startsWith("subtitle:"))return r.substring(9).trim();return null}function O(s){var t;const r=((t=s.variants)==null?void 0:t.edges)||[];return r.length===0?!1:r.every(n=>!n.node.availableForSale)}function P(s){const r=parseFloat(s);return isNaN(r)?`₦${s}`:`₦${r.toLocaleString("en-NG",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function A(s){var n;const r=N(a=>a.items),t=(((n=s.variants)==null?void 0:n.edges)||[]).map(a=>a.node.id);return r.some(a=>t.includes(a.variantId))}function q({product:s,index:r=0}){var p,g,f,h;const{node:t}=s,n=(f=(g=(p=t.images)==null?void 0:p.edges)==null?void 0:g[0])==null?void 0:f.node,a=(h=t.priceRange)==null?void 0:h.minVariantPrice,l=F(t),i=O(t),c=A(t),d=t.description||"",x=I(a==null?void 0:a.amount),[u,o]=b.useState(!1),m=d.length>140?d.substring(0,140).trim()+"…":d;return e.jsxs("div",{className:"reveal flex flex-col",style:{transitionDelay:`${r*.12}s`},children:[e.jsx(y,{to:`/original-work/${t.handle}`,className:"block relative group",children:e.jsxs("div",{className:"relative aspect-[3/4] overflow-hidden bg-secondary/40",children:[n?e.jsx("img",{src:n.url,alt:n.altText||t.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105",loading:"lazy"}):e.jsx("div",{className:"w-full h-full bg-secondary/60 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-24 h-24 mx-auto mb-3 border border-primary/20 rounded-full flex items-center justify-center",children:e.jsx("span",{className:"text-primary/40 text-3xl font-serif",children:"?"})}),e.jsx("span",{className:"text-muted-foreground text-xs uppercase tracking-[0.2em]",children:"Image Coming Soon"})]})}),i&&e.jsx("div",{className:"absolute inset-0 bg-background/40 flex items-start justify-end overflow-hidden",children:e.jsx("div",{className:"bg-background/90 text-foreground text-sm md:text-base uppercase tracking-[0.2em] px-16 py-2 transform rotate-45 translate-x-10 translate-y-8 origin-center",style:{fontFamily:"'Bruno Ace', cursive",fontSize:"clamp(0.65rem, 1.2vw, 0.8rem)"},children:"Sold Out"})}),!i&&c&&e.jsx("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center",children:e.jsxs("div",{className:"border border-primary/40 bg-background/70 backdrop-blur-sm px-6 py-4 text-center",children:[e.jsx("p",{className:"text-[10px] uppercase tracking-[0.25em] text-primary/80 mb-1",children:"Pending Transaction"}),e.jsx("p",{className:"text-sm md:text-base uppercase tracking-[0.15em] text-foreground",style:{fontFamily:"'Bruno Ace', cursive",fontSize:"clamp(0.65rem, 1.2vw, 0.8rem)"},children:"In Cart"})]})})]})}),e.jsxs("div",{className:"flex flex-col items-center text-center pt-8 pb-6 px-4 flex-1",children:[e.jsxs("p",{className:"text-[9px] md:text-[10px] uppercase tracking-[0.25em] text-primary/70 mb-2",style:{fontVariant:"small-caps"},children:["Performed by ",t.vendor||"Murals.ng"]}),e.jsx("h3",{className:"text-foreground tracking-wide uppercase",style:{fontFamily:"'Bruno Ace', cursive",fontSize:"clamp(0.75rem, 1.5vw, 0.9rem)"},children:t.title}),l&&e.jsx("p",{className:"text-sm text-primary/70 mt-1.5 italic font-sans",children:l}),e.jsx("div",{className:"w-10 h-px bg-primary/50 my-5"}),m&&e.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground max-w-[280px] font-sans",children:m}),e.jsx("div",{className:"flex-1"}),a&&!i&&!c&&e.jsx("p",{className:"text-lg md:text-xl text-primary mt-6 tracking-wide",style:{fontFamily:"'Bruno Ace', cursive"},children:P(a.amount)}),e.jsx("div",{className:"w-full mt-5 max-w-[280px]",children:i?e.jsx("span",{className:"block w-full text-center border border-border/50 text-muted-foreground
1/50 px-6 py-3 uppercase tracking-[0.2em] text-xs cursor-not-allowed",children:"Sold Out"}):c?e.jsx("span",{className:"block w-full text-center border border-primary/30 text-primary/60 px-6 py-3 uppercase tracking-[0.2em] text-xs",children:"Item Held by Another Guest"}):x?e.jsx("button",{onClick:j=>{j.preventDefault(),o(!0)},className:"btn-luxury block w-full text-center",children:e.jsx("span",{className:"text-xs tracking-[0.25em]",children:"Inquire"})}):e.jsx(y,{to:`/original-work/${t.handle}`,className:"btn-luxury block w-full text-center",children:e.jsx("span",{className:"text-xs tracking-[0.25em]",children:"Acquire Now"})})}),e.jsx(S,{open:u,onOpenChange:o,productTitle:t.title,productHandle:t.handle})]})]})}function M(){const{data:s,isLoading:r,error:t}=w(50,'tag:"edition:one-of-one"'),n=C([s]),a=b.useMemo(()=>s?[...s].sort((l,i)=>{var x,u,o,m;const c=parseFloat(((u=(x=l.node.priceRange)==null?void 0:x.minVariantPrice)==null?void 0:u.amount)||"0");return parseFloat(((m=(o=i.node.priceRange)==null?void 0:o.minVariantPrice)==null?void 0:m.amount)||"0")-c}):[],[s]);return e.jsxs(v,{children:[e.jsx("section",{className:"pt-32 pb-6 md:pt-40 md:pb-10",children:e.jsxs("div",{className:"container-luxury text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[e.jsx("div",{className:"w-12 h-px bg-primary"}),e.jsx("p",{className:"text-[10px] md:text-xs uppercase tracking-[0.35em] text-primary/70",style:{fontVariant:"small-caps"},children:"Original Works · One of One"}),e.jsx("div",{className:"w-12 h-px bg-primary"})]}),e.jsx("h1",{className:"text-primary text-2xl md:text-4xl lg:text-5xl tracking-[0.15em] md:tracking-[0.2em] uppercase mb-4",style:{fontFamily:"'Bruno Ace', cursive"},children:"Investment Catalogue"}),e.jsx("p",{className:"text-muted-foreground text-sm md:text-base max-w-2xl mx-auto leading-relaxed font-sans",children:"Original works by Nigeria's finest contemporary artists — each piece a singular expression of heritage, craft, and cultural permanence."})]})}),e.jsx("section",{ref:n,className:"pb-10 md:pb-16",children:e.jsxs("div",{className:"container-luxury",children:[r&&e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(k,{className:"h-8 w-8 animate-spin text-primary"})}),t&&e.jsx("div",{className:"text-center py-20",children:e.jsx("p",{className:"text-muted-foreground",children:"Unable to load investment pieces. Please try again later."})}),!r&&!t&&a.length===0&&e.jsx("div",{className:"text-center py-20",children:e.jsx("p",{className:"text-muted-foreground",children:"No investment pieces available at this time."})}),a.length>0&&e.jsx("div",{className:"grid gap-8 md:gap-10 lg:gap-12 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",children:a.map((l,i)=>e.jsx(q,{product:l,index:i},l.node.id))})]})}),e.jsx("section",{className:"py-16 md:py-24",children:e.jsxs("div",{className:"container-luxury text-center",children:[e.jsx("p",{className:"text-muted-foreground text-sm md:text-base mb-2 font-sans",children:"For private viewings & acquisitions"}),e.jsx("p",{className:"text-[10px] uppercase tracking-[0.3em] text-primary/60 mb-8",children:"Contact our advisory team"}),e.jsx("a",{href:"https://form.typeform.com/to/OcN6gE3M",target:"_blank",rel:"noopener noreferrer",className:"btn-luxury inline-block",children:e.jsx("span",{className:"text-xs tracking-[0.25em]",children:"Enquire About A Piece"})})]})})]})}export{M as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.