// globals.d.ts — Plan 01-11 ambient declarations for Vite `define`
// text-replacement tokens.
//
// `__MOKOSH_UAT__` is a build-time boolean token replaced by Vite's
// `define` config (vite.config.ts sets it `false`, vite.test.config.ts
// overrides it to `true`). The token gates the test-hook dynamic
// imports in src/background/index.ts + src/offscreen/recorder.ts;
// production builds tree-shake the entire `if (__MOKOSH_UAT__)` block
// because Rollup recognizes `if (false)` as a static dead branch.
//
// Declaring the symbol here keeps the src/ tree type-clean under
// `npx tsc --noEmit` without spreading per-file ambient declarations.
//
// References:
//   - Vite define: https://vite.dev/config/shared-options.html#define
//   - TypeScript ambient declarations:
//     https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html

declare const __MOKOSH_UAT__: boolean;

// Plan 01-10 must_have #9 path-A swap-in (landed 2026-05-20):
// ambient declaration for Vite `?url` asset imports. The `?url`
// suffix instructs Vite to emit the asset to `dist/assets/<hash>.<ext>`
// and replace the import with the hashed asset URL as a string at
// build time. We declare the wildcard module so TypeScript accepts
// the import without spreading per-file `vite/client` triple-slash
// directives.
//
// References:
//   - Vite explicit URL imports:
//     https://vite.dev/guide/assets.html#explicit-url-imports
//   - TypeScript ambient module declarations:
//     https://www.typescriptlang.org/docs/handbook/modules/reference.html#ambient-modules
declare module '*.svg?url' {
  const url: string;
  export default url;
}
