import { $, html } from "sigpro"; $.component( "c-menu", (props, { emit }) => { const getItems = () => props.items() || []; const renderItems = (data) => { return data.map((item) => { const hasChildren = item.sub && item.sub.length > 0; const content = html` ${item.icon ? html` ` : ""} ${item.label} `; if (hasChildren) { return html`
  • ${content}
  • `; } return html`
  • ${content}
  • `; }); }; return html` `; }, ["items", "cls"], );