2026-09-20 11:16:17 -04:00
|
|
|
import { LitElement, html, unsafeCSS } from "lit";
|
|
|
|
|
import panelTokens from "../../../custom_components/nestquest/www/nestquest-panel-tokens.css?inline";
|
2026-09-20 10:08:38 -04:00
|
|
|
|
|
|
|
|
import { registerCustomCard, type CardConfig, type HassLike } from "../types";
|
|
|
|
|
|
|
|
|
|
export class NestQuestPartyBoardCard extends LitElement {
|
|
|
|
|
static properties = {
|
|
|
|
|
hass: { attribute: false },
|
|
|
|
|
_config: { state: true },
|
|
|
|
|
};
|
|
|
|
|
|
2026-09-20 11:16:17 -04:00
|
|
|
static styles = [unsafeCSS(panelTokens)];
|
|
|
|
|
|
2026-09-20 10:08:38 -04:00
|
|
|
hass?: HassLike;
|
|
|
|
|
_config?: CardConfig;
|
|
|
|
|
|
|
|
|
|
setConfig(config: CardConfig): void {
|
|
|
|
|
if (!config || typeof config !== "object") {
|
|
|
|
|
throw new Error("Invalid configuration");
|
|
|
|
|
}
|
|
|
|
|
this._config = config;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getCardSize(): number {
|
|
|
|
|
return 6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
return html`<div>NestQuest Party Board</div>`;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
customElements.define("nestquest-party-board-card", NestQuestPartyBoardCard);
|
|
|
|
|
registerCustomCard({
|
|
|
|
|
type: "nestquest-party-board-card",
|
|
|
|
|
name: "NestQuest Party Board",
|
|
|
|
|
description: "Kids' attract screen for present and away adventurers.",
|
|
|
|
|
});
|