import { tr } from '../../../src/lib/ui-i18n.ts'; import { LitElement, html, nothing } from 'lit'; import { labStyles, defineVersionedElement } from './styles.js'; export class CommandWorkbench extends LitElement { static componentVersion = '1.0.0'; static properties = { model: { attribute: false } }; static styles = labStyles; constructor() { super(); this.model = null; } intent(action, value) { this.dispatchEvent(new CustomEvent('wu-command-intent', { detail: { action, value }, bubbles:true, composed:true })); } render() { const m = this.model; if (!m) return html`

${tr("Preparando constructor…")}

`; return html`

${tr("Construir un comando")}

${tr("Configura una receta del CLI y compártela con el inspector.")}

${m.operation==='create'?html``:nothing}

${m.error||tr("Minúsculas, números y guiones. Empieza por una letra.")}

${m.operation==='add'?html``:nothing}

${tr("Comando generado")}

${m.command||tr("Completa un nombre válido para generar el comando.")}

${m.status}

${m.operation==='create'?html`${tr("Continúa en tu terminal:")} cd ${m.name||''}, wu install ${tr("y")} wu dev.`:html`${tr("Ejecuta")} wu add ${tr("desde la raíz que contiene")} wu.config.json.`}

`; } } defineVersionedElement('wu-docs-command-workbench', CommandWorkbench);