import{a as F}from"./chunk-L33D657C.js";import{a as u,d as z}from"./chunk-VZF4DSDM.js";import{a as I}from"./chunk-GG6XNBV7.js";import{a as L}from"./chunk-LIVIUXQS.js";import{e as S}from"./chunk-CVBVVN6Q.js";import{o as E}from"./chunk-LQ2OPIJL.js";import{Cb as k,Eb as _,Gb as w,Hb as D,Ka as o,R as C,Sb as p,T as h,Wa as P,_a as s,db as M,hb as d,ib as r,jb as m,mb as b,na as y,ub as l,vb as g,wb as O}from"./chunk-MFMPTNOZ.js";import{a as v,b as x}from"./chunk-4CLCTAJ7.js";var N=i=>["/designs",i];function R(i,c){if(i&1&&(d(0,"a",1),m(1,"app-mockup-canvas",2),r(),d(2,"div",3)(3,"h3",4)(4,"a",5),l(5),r()(),d(6,"p",6),l(7),r(),d(8,"div",7)(9,"span",8)(10,"span",9),l(11,"From"),r(),l(12),w(13,"price"),r(),d(14,"span",10),l(15," Pick a product "),m(16,"app-icon",11),r()()()),i&2){let e,a,t,f=c,n=b();s("routerLink",_(14,N,n.design().slug)),o(),s("product",f)("colorHex",(e=(e=n.color())==null?null:e.hex)!==null&&e!==void 0?e:"#ffffff")("colorName",(a=(a=n.color())==null?null:a.name)!==null&&a!==void 0?a:"")("tone",(t=(t=n.color())==null?null:t.tone)!==null&&t!==void 0?t:"light")("design",n.artwork())("placement",n.placement()),o(3),s("routerLink",_(16,N,n.design().slug)),o(),g(n.design().name),o(2),g(n.design().tagline),o(5),O(" ",D(13,12,f.basePrice)," "),o(4),s("size",15)}}var T=class i{products=C(E);design=y.required();product=p(()=>this.products.productBySlug(this.design().productSlug));placement=p(()=>x(v({},u),{position:this.product()?.positions[0]?.id??u.position,scale:1}));color=p(()=>{let c=this.product();return c?.colors.find(e=>e.id===this.design().colorId)??c?.colors[0]});artwork=p(()=>z(this.design(),this.color()?.tone??"light"));static \u0275fac=function(e){return new(e||i)};static \u0275cmp=h({type:i,selectors:[["app-design-card"]],inputs:{design:[1,"design"]},standalone:!0,features:[k],decls:2,vars:1,consts:[[1,"dcard"],["tabindex","-1","aria-hidden","true",1,"dcard__media",3,"routerLink"],["view","front",3,"product","colorHex","colorName","tone","design","placement"],[1,"dcard__body"],[1,"dcard__title"],[3,"routerLink"],[1,"dcard__tagline"],[1,"dcard__meta"],[1,"dcard__price"],[1,"dcard__from"],[1,"dcard__cta"],["name","arrow-right",3,"size"]],template:function(e,a){if(e&1&&(d(0,"article",0),P(1,R,17,18),r()),e&2){let t;o(),M((t=a.product())?1:-1,t)}},dependencies:[S,F,L,I],styles:['[_nghost-%COMP%]{display:block;height:100%}.dcard[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-xl);overflow:hidden;transition:transform var(--normal) var(--ease),box-shadow var(--normal) var(--ease),border-color var(--normal) var(--ease)}.dcard[_ngcontent-%COMP%]:hover{transform:translateY(-4px);box-shadow:var(--shadow-md);border-color:var(--line-strong)}.dcard[_ngcontent-%COMP%]:hover   .dcard__cta[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{transform:translate(3px)}.dcard__media[_ngcontent-%COMP%]{display:block;padding:10px;background:linear-gradient(160deg,var(--canvas-2),var(--canvas))}.dcard__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;padding:14px 16px 16px;flex:1}.dcard__title[_ngcontent-%COMP%]{font-size:1rem;margin:0}.dcard__title[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0}.dcard__tagline[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--muted);line-height:1.45}.dcard__meta[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-top:auto;padding-top:8px}.dcard__price[_ngcontent-%COMP%]{font-weight:800;font-size:1.02rem}.dcard__from[_ngcontent-%COMP%]{font-size:.68rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}.dcard__cta[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;font-size:.82rem;font-weight:700;color:var(--brand)}.dcard__cta[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{transition:transform var(--fast) var(--ease)}'],changeDetection:0})};export{T as a};
