import{LitElement as e,html as t,css as c}from"lit";import{iconRemixCheckboxCircleFill as o}from"./assets/cc-remix.icons.js";import"./cc-badge.js";import"./cc-icon.js";class l extends e{static get properties(){return{badge:{type:Object},details:{type:Array},disabled:{type:Boolean,reflect:!0},name:{type:String},selected:{type:Boolean,reflect:!0}}}constructor(){super(),this.badge=null,this.details=[],this.disabled=!1,this.name=null,this.selected=!1}render(){return t`<div class=title><div class=name>${this.name}</div>${null!=this.badge?t`<cc-badge .intent=${this.badge.intent}>${this.badge.content}</cc-badge>`:""}</div><cc-icon class=icon-selected .icon=${o} size=lg></cc-icon>${this.details?.length>0?t`<ul class=details>${this.details.map((e=>this._renderDetail(e)))}</ul>`:""}`}_renderDetail(e){return t`<li class=detail><span class=detail-icon><cc-icon .icon=${e.icon} size=md></cc-icon></span><span class=detail-value>${e.value}</span></li>`}static get styles(){return[c`:host{border:2px solid var(--cc-color-border-neutral,#eee);border-radius:var(--cc-border-radius-default,.25em);display:block;position:relative}.title{align-items:center;column-gap:.375em;display:inline-flex;flex-wrap:wrap;padding:1em 1em .75em}.name{font-size:1.25em}:host([selected]) .name{color:var(--cc-color-text-primary-strongest)}.icon-selected{--cc-icon-color:var(--cc-color-bg-primary);display:none;position:absolute;right:.5em;top:.5em}:host([selected]) .icon-selected{display:block}.details{background-color:var(--cc-color-bg-neutral);display:flex;flex-direction:column;gap:.25em 0;margin:0;padding:.75em 1em}:host([selected]) .details{background-color:var(--cc-color-bg-primary-weak)}.detail{display:inline-flex;gap:.5em}.detail-icon{align-self:center;color:var(--cc-color-text-weak)}:host([selected]) .detail-icon{color:var(--cc-color-text-primary)}.detail-value{color:var(--cc-color-text-weak);font-size:.875em}:host(:focus-visible){outline:var(--cc-focus-outline,#000 solid 2px);outline-offset:2px}:host([selected]){border-color:var(--cc-color-bg-primary)}:host([selected]) .detail-value{color:var(--cc-color-text-primary-strongest)}:host([disabled]){border-color:var(--cc-color-border-neutral-disabled,#777);opacity:var(--cc-opacity-when-disabled,.65)}:host(:hover:not([disabled])){border-color:var(--cc-color-border-neutral-hovered,#777)}:host(:not([selected],[disabled])){cursor:pointer}`]}}window.customElements.define("cc-plan-item",l);export{l as CcPlanItem};
//# sourceMappingURL=cc-plan-item.js.map
