import { AstroIntegration } from 'astro'; import { T as TogglyConfig } from '../index-B3YY1P83.js'; import '@ops-ai/toggly-hooks-types'; import '@ops-ai/toggly-local-gates'; /** * Toggly Astro Integration * * Provides build-time configuration, frontmatter extraction, and runtime injection */ interface TogglyIntegrationOptions extends TogglyConfig { /** Browser usage/check/view policy; omitted inherits enableUsageTracking. */ browserEnableUsageTracking?: boolean; /** Browser business metrics policy; omitted inherits enableMetrics. */ browserEnableMetrics?: boolean; } /** * Toggly Astro Integration */ declare function togglyIntegration(options?: TogglyIntegrationOptions): AstroIntegration; /** * Astro middleware to inject Toggly into locals * This should be added to src/middleware.ts in the user's project * * Creates a request-scoped server client (process handlers off, no flush timer * by default) and closes it when the request finishes so usage telemetry does * not accumulate Node listeners or intervals across requests. */ declare function createTogglyMiddleware(config: TogglyConfig): ({ locals }: { locals: Record; }, next: () => Promise) => Promise; export { type TogglyIntegrationOptions, createTogglyMiddleware, togglyIntegration as default };