blob: f604bd527f5d87e4d12e8b973fa676e47f8e0df4 [file] [log] [blame]
Sean McCullough71941bd2025-04-18 13:31:48 -07001import { css, html, LitElement } from "lit";
2import { customElement, property } from "lit/decorators.js";
Sean McCullough86b56862025-04-18 13:04:03 -07003
Sean McCullough71941bd2025-04-18 13:31:48 -07004@customElement("sketch-network-status")
Sean McCullough86b56862025-04-18 13:04:03 -07005export class SketchNetworkStatus extends LitElement {
Sean McCullough86b56862025-04-18 13:04:03 -07006 @property()
7 connection: string;
Sean McCulloughb29f8912025-04-20 15:39:11 -07008
Sean McCullough86b56862025-04-18 13:04:03 -07009 @property()
Sean McCullough86b56862025-04-18 13:04:03 -070010 error: string;
Sean McCullough71941bd2025-04-18 13:31:48 -070011
Sean McCullough86b56862025-04-18 13:04:03 -070012 // See https://lit.dev/docs/components/styles/ for how lit-element handles CSS.
13 // Note that these styles only apply to the scope of this web component's
14 // shadow DOM node, so they won't leak out or collide with CSS declared in
15 // other components or the containing web page (...unless you want it to do that).
16
17 static styles = css`
Sean McCullough71941bd2025-04-18 13:31:48 -070018 .status-container {
Philip Zeyliger5e357022025-05-16 04:50:34 +000019 display: none; /* Hide by default - we're removing the dot */
Sean McCullough71941bd2025-04-18 13:31:48 -070020 }
21 `;
Sean McCullough86b56862025-04-18 13:04:03 -070022
23 constructor() {
24 super();
25 }
26
27 // See https://lit.dev/docs/components/lifecycle/
28 connectedCallback() {
29 super.connectedCallback();
30 }
31
32 // See https://lit.dev/docs/components/lifecycle/
33 disconnectedCallback() {
Sean McCullough71941bd2025-04-18 13:31:48 -070034 super.disconnectedCallback();
Sean McCullough86b56862025-04-18 13:04:03 -070035 }
36
Sean McCullough86b56862025-04-18 13:04:03 -070037 render() {
Philip Zeyliger5e357022025-05-16 04:50:34 +000038 // We no longer show any content as the dot is being removed
39 // The connection status will now be handled by the call-status component
Autoformatter8c463622025-05-16 21:54:17 +000040 return html` <div class="status-container"></div> `;
Sean McCullough86b56862025-04-18 13:04:03 -070041 }
42}
43
44declare global {
45 interface HTMLElementTagNameMap {
46 "sketch-network-status": SketchNetworkStatus;
47 }
Sean McCullough71941bd2025-04-18 13:31:48 -070048}