import {Op, prep_render_op} from "@benev/slate" import {html, TemplateResult} from "@benev/slate" import {styles} from "./styles.js" import {shadow_view} from "../../context/context.js" const loadingState = shadow_view(use => () => { use.styles(styles) return html`
` }) const errorState = shadow_view(use => (reason: string) => { use.styles(styles) if(reason === "webcodecs-not-supported") { return html`

Browser not supported

to use omniclip, you need to use latest version of either:

` } else { return html`
FFMPEG ERROR LOADING: ${reason}
` } }) export const StateHandler = prep_render_op({ loading: () => loadingState([]), error: (reason) => errorState([reason]) }) as (op: Op.For, on_ready: (value: any) => TemplateResult) => TemplateResult