import { Element, type ElementStyle, type Style, type StyleFn } from "./UINode"

export type UISpacerStyle = ElementStyle

export interface UISpacer {
  readonly type: "spacer",
  style: Style<this, UISpacerStyle>,

  setClass(name: string, enabled: boolean): this
  toggleClass(name: string): this
  hasClass(name: string): boolean
  bindClass(name: string, fn: () => boolean): this
}
export function UISpacer(): UISpacer
export function UISpacer(style: UISpacerStyle): UISpacer
export function UISpacer(style?: UISpacerStyle): UISpacer {
  return new Element("spacer", style ?? {})
}