/* * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ import { DrawerContextValue, DrawerEvent } from "./types.js"; import "client-only"; import * as react9 from "react"; import { UniqueId } from "@accelint/core"; import { Broadcast } from "@accelint/bus"; //#region src/components/drawer/context.d.ts /** * Context for sharing Drawer state across child components. * * @example * ```tsx * const { register, unregister, placement } = useContext(DrawerContext); * ``` */ declare const DrawerContext: react9.Context; /** * Event bus instance for drawer-related events. * * @example * ```tsx * import { bus } from './context'; * bus.on('Drawer:open', (event) => console.log(event)); * ``` */ declare const bus: Broadcast; /** * Event handlers for controlling drawer state programmatically. * * @example * ```tsx * import { DrawerEventHandlers } from './context'; * * DrawerEventHandlers.open(viewId); * DrawerEventHandlers.toggle(viewId); * DrawerEventHandlers.close(viewId); * ``` */ declare const DrawerEventHandlers: { readonly close: (view: UniqueId) => void; readonly open: (view: UniqueId) => void; readonly toggle: (view: UniqueId) => void; readonly back: (stack: UniqueId) => void; readonly clear: (stack: UniqueId) => void; readonly push: (view: UniqueId) => void; readonly reset: (stack: UniqueId) => void; }; /** * Hook for emitting drawer events (open, close, toggle, push, pop, clear). * * @returns Object with methods to emit drawer events. * * @example * ```tsx * const emit = useDrawerEmit(); * emit.open(viewId); * emit.toggle(viewId); * emit.close(); * ``` */ declare function useDrawerEmit(): { readonly close: (view: UniqueId) => void; readonly open: (view: UniqueId) => void; readonly toggle: (view: UniqueId) => void; readonly back: (stack: UniqueId) => void; readonly clear: (stack: UniqueId) => void; readonly push: (view: UniqueId) => void; readonly reset: (stack: UniqueId) => void; }; //#endregion export { DrawerContext, DrawerEventHandlers, bus, useDrawerEmit }; //# sourceMappingURL=context.d.ts.map