import{n as e}from"./rolldown-runtime-DkW27tQK.js";import{G as t,J as n,W as r}from"./lit-runtime-BEtFSUCp.js";import{Ht as i,qt as a}from"./control-ui-core-Br5DB0Zj.js";import{n as o,t as s}from"./workboard-widget-CLPt7UPr.js";var c,l;function u(){return(u=e((()=>{r(),i(),o(),c=class extends s{async handleStatusChange(e){let t=this.readStringProp(`cardId`),n=this.cards.find(e=>e.id===t),r=e.currentTarget.value;!n||!this.statuses.includes(r)||await this.moveCard(n,r)}render(){let e=this.readStringProp(`cardId`);if(!e)return n``;if(this.loading&&!this.loaded)return n`

${a(`workboard.widget.loading`)}

`;if(this.error)return n``;let r=this.cards.find(t=>t.id===e);if(!r)return n`

${a(`workboard.widget.cardMissing`)}

`;let i=this.statuses.includes(r.status)?this.statuses:[r.status,...this.statuses],o=r.priority.charAt(0).toUpperCase()+r.priority.slice(1);return n`
${r.title} ${a(`workboard.status.${r.status}`)}
${a(`workboard.fieldPriority`)}
${o}
${a(`workboard.fieldAgent`)}
${r.agentId??a(`workboard.widget.unassigned`)}
${i.length>1?n` `:t}
`}},customElements.get(`openclaw-workboard-card-widget`)||customElements.define(`openclaw-workboard-card-widget`,c),l=({widget:e,sessionKey:t,active:r,canMutate:i,requestUpdate:a})=>n` `})))()}u();export{l as renderWorkboardCardWidget}; //# sourceMappingURL=workboard-card-BMjMu6ik.js.map