import { css, customElement, html, LitElement, property, TemplateResult } from "lit-element"; import { Application } from "../../api/application"; import { DefaultClient } from "../../api/client"; import { COMMON_STYLES } from "../../common/styles"; import { Table } from "../../elements/Table"; @customElement("pb-bound-policies-list") export class BoundPoliciesList extends Table { @property() target?: string; apiEndpoint(): string[] { return ["policies", "bindings", `?target=${this.target}`]; } columns(): string[] { return ["Foo"]; } row(item: any): TemplateResult[] { return [html`${item}`]; } } @customElement("pb-application-view") export class ApplicationViewPage extends LitElement { @property() set args(value: { [key: string]: string }) { this.applicationSlug = value.slug; } @property() set applicationSlug(value: string) { Application.get(value).then((app) => (this.application = app)); } @property() application?: Application; static get styles() { return COMMON_STYLES.concat( css` img.pf-icon { max-height: 24px; } ` ); } render() { if (!this.application) { return html``; } return html`

${this.application?.name}

${this.application?.meta_publisher}

`; } }