import type { Resource } from "@src/component"; import { LitElement } from "lit"; import { property } from "lit/decorators.js"; export class ComponentObjectsHandler extends LitElement { @property({ attribute: false }) objects?: Resource[] = []; hasType = (type: string, objs: Resource[] = this.objects as Resource[]) => { const typeValue = new Set(objs.flatMap((o) => o["@type"])); return typeValue.has(type); }; }