import { n as FontCategory } from "./fallbacks-Cj4LUWhi.cjs";
import { Plugin } from "postcss";
//#region src/postcss.d.ts
export interface FontainePostcssOptions {
  /**
   * Font family fallbacks to use.
   * Can be an array of fallback font family names to use for all fonts,
   * or an object where keys are font family names and values are arrays of fallback font families.
   */
  fallbacks: string[] | Record<string, string[]>;
  /**
   * Category-specific fallback font stacks.
   * When a font's category is detected (serif, sans-serif, monospace, etc.),
   * these fallbacks will be used if no explicit per-family override is provided.
   * @optional
   */
  categoryFallbacks?: Partial<Record<FontCategory, string[]>>;
  /**
   * Function to resolve a font `src` value declared in a stylesheet to the font file it
   * refers to, as either a URL or an absolute path on disk.
   * @optional
   */
  resolvePath?: (path: string) => string | URL;
  /**
   * A function to determine whether to skip font face generation for a given fallback name.
   *
   * Families skipped this way are still given a fallback in `font-family` declarations,
   * on the assumption that the `@font-face` rule is provided elsewhere.
   * @optional
   */
  skipFontFaceGeneration?: (fallbackName: string) => boolean;
  /**
   * Function to generate an unquoted font family name to use as a fallback.
   * This should return a valid CSS font family name and should not include quotes.
   * @optional
   */
  fallbackName?: (name: string) => string;
}
/**
 * A PostCSS plugin that generates metric-adjusted fallback `@font-face` rules and appends
 * them to `font-family` declarations.
 *
 * Unlike {@link FontaineTransform}, this runs over fully-compiled CSS, so it sees
 * `@font-face` rules and `font-family` values produced by preprocessors such as Sass.
 */
interface FontainePlugin {
  (options: FontainePostcssOptions): Plugin;
  postcss: true;
}
declare const plugin: FontainePlugin;
//#endregion
export { plugin as default };