import {html} from "lit" import {view} from "@e280/sly" import styleCss from "./style.css.js" import themeCss from "../../theme.css.js" import {Loader} from "./loader.js" import {SpinnerView} from "../spinner/view.js" import {LoadingOperation} from "./parts/operation.js" export const LoaderView = view(use => (loader: Loader) => { use.name("loader") use.css(themeCss, styleCss) const stage = loader.stage.value const curtain = loader.curtain.value const operation = loader.operation.value function renderLoadScreen({tasks}: LoadingOperation, visible: boolean) { const count = 3 const remaining = tasks.size - count const focustasks = [...tasks].slice(0, count) return html`