import{r as k}from"./Cf5i2Hk_.js";import{Q as I,a0 as w,a1 as q,e as c,a as u,p as C,m as S,a7 as $,f as l,ac as n,s as t,ab as g,q as V,c as d,am as f,o,af as B,ah as h,ag as x}from"./B3fabVUf.js";import"./BN_7HF1G.js";const j={slots:{base:["group relative block my-5 p-4 sm:p-6 border border-default rounded-md bg-default","transition-colors"],icon:"size-6 mb-2 block",title:"text-highlighted font-semibold",description:"text-[15px] text-muted *:first:mt-0 *:last:mb-0 *:my-1",externalIcon:["size-4 align-top absolute right-2 top-2 text-dimmed pointer-events-none","transition-colors"]},variants:{color:{primary:{icon:"text-primary"},secondary:{icon:"text-secondary"},success:{icon:"text-success"},info:{icon:"text-info"},warning:{icon:"text-warning"},error:{icon:"text-error"},neutral:{icon:"text-highlighted"}},to:{true:""},title:{true:{description:"mt-1"}}},compoundVariants:[{color:"primary",to:!0,class:{base:"hover:bg-primary/10 hover:border-primary has-focus-visible:border-primary",externalIcon:"group-hover:text-primary"}},{color:"secondary",to:!0,class:{base:"hover:bg-secondary/10 hover:border-secondary has-focus-visible:border-secondary",externalIcon:"group-hover:text-secondary"}},{color:"success",to:!0,class:{base:"hover:bg-success/10 hover:border-success has-focus-visible:border-success",externalIcon:"group-hover:text-success"}},{color:"info",to:!0,class:{base:"hover:bg-info/10 hover:border-info has-focus-visible:border-info",externalIcon:"group-hover:text-info"}},{color:"warning",to:!0,class:{base:"hover:bg-warning/10 hover:border-warning has-focus-visible:border-warning",externalIcon:"group-hover:text-warning"}},{color:"error",to:!0,class:{base:"hover:bg-error/10 hover:border-error has-focus-visible:border-error",externalIcon:"group-hover:text-error"}},{color:"neutral",to:!0,class:{base:"hover:bg-elevated/50 hover:border-inverted has-focus-visible:border-inverted",externalIcon:"group-hover:text-highlighted"}}],defaultVariants:{color:"primary"}},P=Object.assign({inheritAttrs:!1},{__name:"ProseCard",props:{to:{type:null,required:!1},target:{type:[String,Object,null],required:!1},icon:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},color:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(r){const e=r,b=I(),p=w(),s=q("prose.card",e),a=d(()=>f({extend:f(j),...p.ui?.prose?.card||{}})({color:e.color,to:!!e.to,title:!!e.title})),m=d(()=>e.target||(e.to&&typeof e.to=="string"&&e.to.startsWith("http")?"_blank":void 0)),y=d(()=>(e.title||"Card link").trim());return(i,v)=>(o(),c("div",{class:n(a.value.base({class:[t(s)?.base,e.class]}))},[r.to?(o(),u($,S({key:0,"aria-label":y.value},{to:r.to,target:m.value,...i.$attrs},{class:"focus:outline-none",raw:""}),{default:C(()=>[...v[0]||(v[0]=[B("span",{class:"absolute inset-0","aria-hidden":"true"},null,-1)])]),_:1},16,["aria-label"])):l("",!0),r.icon?(o(),u(g,{key:1,name:r.icon,class:n(a.value.icon({class:t(s)?.icon}))},null,8,["name","class"])):l("",!0),r.to&&m.value==="_blank"?(o(),u(g,{key:2,name:t(p).ui.icons.external,class:n(a.value.externalIcon({class:t(s)?.externalIcon}))},null,8,["name","class"])):l("",!0),r.title||b.title?(o(),c("p",{key:3,class:n(a.value.title({class:t(s)?.title}))},[k(i.$slots,"title",{mdcUnwrap:"p"},()=>[h(x(r.title),1)])],2)):l("",!0),b.default?(o(),c("div",{key:4,class:n(a.value.description({class:t(s)?.description}))},[V(i.$slots,"default",{},()=>[h(x(r.description),1)])],2)):l("",!0)],2))}});export{P as default};
