import { provide } from "@lit/context"; import { customElement, property, state } from "lit/decorators.js"; import { AbstractRegistryProvider } from "../abstraction/AbstractRegistryProvider"; import { RegistryContext, registryContext, registryLoadingContext, registryMaxContext, registryMinContext, registryOpacityContext, registryRangeFromContext, registryRangeToContext } from "./context/RegistryContext"; @customElement("registry-provider") export class RegistryProviderElement extends AbstractRegistryProvider { @property({ type: String, reflect: true, attribute: true }) slug!: string; @provide({ context: registryContext }) public registry!: RegistryContext; @provide({ context: registryOpacityContext }) @property({ type: Number, reflect: true, attribute: true }) public opacity: number = 1; @provide({ context: registryMinContext }) @state() protected min?: number; @provide({ context: registryMaxContext }) @state() protected max?: number; @provide({ context: registryRangeFromContext }) @property({ type: Number, reflect: true, attribute: true }) public from?: number; @provide({ context: registryRangeToContext }) @property({ type: Number, reflect: true, attribute: true }) public to?: number; @provide({ context: registryLoadingContext }) @property({ type: String, reflect: true, attribute: true }) public loading: boolean = false; @property({type: Boolean, reflect: true}) public autoclear: boolean = false; }