import type { $AgbaColor } from "../../util/color.js"; import type { $Insets, DOMInsets } from "../../util/insets.js"; import { InsetsPlugin, type $InsetsRawState, type $InsetsState } from "./insets.plugin.js"; /** * 条栏的风格 * Light 代表文字为黑色 * Dark 代表文字为白色 */ export declare enum BAR_STYLE { /** * Light text for dark backgrounds. * */ Dark = "DARK", /** * Dark text for light backgrounds. * */ Light = "LIGHT", /** * The style is based on the device appearance. * If the device is using Dark mode, the bar text will be light. * If the device is using Light mode, the bar text will be dark. * On Android the default will be the one the app was launched with. * */ Default = "DEFAULT" } export interface $BarRawState extends $InsetsRawState { /** * Whether the bar is visible or not. */ visible: boolean; /** * The current bar style. */ style: BAR_STYLE; /** * The current bar color. * * This option is only supported on Android. */ color: $AgbaColor; /** * Whether the bar is overlaid or not. * * This option is only supported on Android. */ overlay: boolean; insets: $Insets; } export interface $BarState extends $InsetsState { color: string; style: BAR_STYLE; overlay: boolean; visible: boolean; insets: DOMInsets; } export type $BarWritableState = Omit<$BarState, "insets">; export declare abstract class BarPlugin extends InsetsPlugin { /** * 设置 Bar 背景色 * Hex */ setColor(color: string): Promise; /** * 获取背景颜色 */ getColor(): Promise; /** * 设置 Bar 风格 * // 支持 light | dark | defalt * 据观测 * 在系统主题为 Light 的时候, Default 意味着 白色字体 * 在系统主题为 Dark 的手, Default 因为这 黑色字体 * 这兴许与设置有关系, 无论如何, 尽可能避免使用 Default 带来的不确定性 * * @param style */ setStyle(style: STATE["style"]): Promise; /** * 获取当前style * @returns */ getStyle(): Promise; /** * 显示 Bar */ show(): Promise; /** * Hide the bar. */ hide(): Promise; setVisible(visible: boolean): Promise; getVisible(): Promise; /** * 设置 Bar 是否应该覆盖 webview 以允许使用 * 它下面的空间。 * */ setOverlay(overlay: boolean): Promise; getOverlay(): Promise; } //# sourceMappingURL=bar.plugin.d.ts.map