/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 *
 */

import type {
  CSSProperties,
  CompiledStyles,
  InlineStyles,
  Keyframes,
  MapNamespaces,
  NestedConstsValue,
  NestedStringValue,
  NestedVarsValue,
  StaticStyles,
  StaticStylesWithout,
  StyleX$Create,
  StyleX$CreateTheme,
  StyleX$DefineVars,
  StyleX$DefineConsts,
  StyleXArray,
  StyleXClassNameFor,
  StyleXStyles,
  StyleXStylesWithout,
  StyleXVar,
  Theme,
  VarGroup,
  PositionTry,
  ViewTransitionClass,
  StyleX$When,
  MapNamespace,
  StyleX$DefineMarker,
  StyleX$Env,
} from './types/StyleXTypes';
import type { ValueWithDefault } from './types/StyleXUtils';
import * as Types from './types/VarTypes';
export type {
  CSSProperties,
  CompiledStyles,
  InlineStyles,
  Keyframes,
  MapNamespaces,
  StaticStyles,
  StaticStylesWithout,
  StyleXArray,
  StyleXClassNameFor,
  StyleXStyles,
  StyleXStylesWithout,
  StyleXVar,
  Theme,
  Types,
  VarGroup,
  PositionTry,
};
export declare const create: StyleX$Create;
export declare type create = typeof create;
export declare const createTheme: StyleX$CreateTheme;
export declare type createTheme = typeof createTheme;
export declare const defineConsts: StyleX$DefineConsts;
export declare type defineConsts = typeof defineConsts;
export declare const defineVars: StyleX$DefineVars;
export declare type defineVars = typeof defineVars;
export declare const unstable_conditional: <
  T extends { readonly default: unknown; readonly [$$Key$$: string]: unknown },
>(
  _value: T,
) => T;
export declare type unstable_conditional = typeof unstable_conditional;
export declare const unstable_defineVarsNested: <
  T extends { readonly [$$Key$$: string]: NestedVarsValue },
>(
  _styles: T,
) => T;
export declare type unstable_defineVarsNested =
  typeof unstable_defineVarsNested;
export declare const unstable_defineConstsNested: <
  T extends { readonly [$$Key$$: string]: NestedConstsValue },
>(
  _styles: T,
) => T;
export declare type unstable_defineConstsNested =
  typeof unstable_defineConstsNested;
export declare const unstable_createThemeNested: (
  _baseTokens: { readonly [$$Key$$: string]: NestedStringValue },
  _overrides: { readonly [$$Key$$: string]: NestedVarsValue },
) => CompiledStyles;
export declare type unstable_createThemeNested =
  typeof unstable_createThemeNested;
export declare const defineMarker: StyleX$DefineMarker;
export declare type defineMarker = typeof defineMarker;
export declare const firstThatWorks: <T extends string | number>(
  ..._styles: ReadonlyArray<T>
) => ReadonlyArray<T>;
export declare type firstThatWorks = typeof firstThatWorks;
export declare const keyframes: (_keyframes: Keyframes) => string;
export declare type keyframes = typeof keyframes;
export declare const positionTry: (_positionTry: PositionTry) => string;
export declare type positionTry = typeof positionTry;
export declare function props(
  this: null | undefined | unknown,
  ...styles: ReadonlyArray<
    StyleXArray<
      | (null | undefined | CompiledStyles)
      | boolean
      | Readonly<[CompiledStyles, InlineStyles]>
    >
  >
): Readonly<{
  className?: string;
  'data-style-src'?: string;
  style?: Readonly<{ [$$Key$$: string]: string | number }>;
}>;
export declare function attrs(
  this: null | undefined | unknown,
  ...styles: ReadonlyArray<
    StyleXArray<
      | (null | undefined | CompiledStyles)
      | boolean
      | Readonly<[CompiledStyles, InlineStyles]>
    >
  >
): Readonly<{ class?: string; 'data-style-src'?: string; style?: string }>;
export declare const viewTransitionClass: (
  _viewTransitionClass: ViewTransitionClass,
) => string;
export declare type viewTransitionClass = typeof viewTransitionClass;
export declare const defaultMarker: () => MapNamespace<
  Readonly<{ marker: 'default-marker' }>
>;
export declare type defaultMarker = typeof defaultMarker;
export declare const when: StyleX$When;
export declare type when = typeof when;
export declare const env: StyleX$Env;
export declare type env = typeof env;
export declare const types: {
  angle: <T extends string | 0 = string | 0>(
    _v: ValueWithDefault<T>,
  ) => Types.Angle<T>;
  color: <T extends string = string>(_v: ValueWithDefault<T>) => Types.Color<T>;
  url: <T extends string = string>(_v: ValueWithDefault<T>) => Types.Url<T>;
  image: <T extends string = string>(_v: ValueWithDefault<T>) => Types.Image<T>;
  integer: <T extends number = number>(
    _v: ValueWithDefault<T>,
  ) => Types.Integer<T>;
  lengthPercentage: <T extends number | string = number | string>(
    _v: ValueWithDefault<T>,
  ) => Types.LengthPercentage<T>;
  length: <T extends number | string = number | string>(
    _v: ValueWithDefault<T>,
  ) => Types.Length<T>;
  percentage: <T extends number | string = number | string>(
    _v: ValueWithDefault<T>,
  ) => Types.Percentage<T>;
  number: <T extends number = number>(_v: ValueWithDefault<T>) => Types.Num<T>;
  resolution: <T extends string = string>(
    _v: ValueWithDefault<T>,
  ) => Types.Resolution<T>;
  time: <T extends string | 0 = string | 0>(
    _v: ValueWithDefault<T>,
  ) => Types.Time<T>;
  transformFunction: <T extends string = string>(
    _v: ValueWithDefault<T>,
  ) => Types.TransformFunction<T>;
  transformList: <T extends string = string>(
    _v: ValueWithDefault<T>,
  ) => Types.TransformList<T>;
};
export declare type types = typeof types;
/**
 * DO NOT USE. Legacy export for Meta
 */

/**
 * DO NOT USE. Legacy export for Meta
 */

type IStyleX = {
  (
    ...styles: ReadonlyArray<
      StyleXArray<(null | undefined | CompiledStyles) | boolean>
    >
  ): string;
  create: StyleX$Create;
  createTheme: StyleX$CreateTheme;
  defineConsts: StyleX$DefineConsts;
  defineVars: StyleX$DefineVars;
  env: StyleX$Env;
  defaultMarker: () => MapNamespace<Readonly<{ marker: 'default-marker' }>>;
  defineMarker: StyleX$DefineMarker;
  firstThatWorks: <T extends string | number>(
    ...v: ReadonlyArray<T>
  ) => ReadonlyArray<T>;
  keyframes: (keyframes: Keyframes) => string;
  positionTry: (positionTry: PositionTry) => string;
  props: (
    this: null | undefined | unknown,
    ...styles: ReadonlyArray<
      StyleXArray<
        | (null | undefined | CompiledStyles)
        | boolean
        | Readonly<[CompiledStyles, InlineStyles]>
      >
    >
  ) => Readonly<{
    className?: string;
    'data-style-src'?: string;
    style?: Readonly<{ [$$Key$$: string]: string | number }>;
  }>;
  attrs: (
    this: null | undefined | unknown,
    ...styles: ReadonlyArray<
      StyleXArray<
        | (null | undefined | CompiledStyles)
        | boolean
        | Readonly<[CompiledStyles, InlineStyles]>
      >
    >
  ) => Readonly<{ class?: string; 'data-style-src'?: string; style?: string }>;
  viewTransitionClass: (viewTransitionClass: ViewTransitionClass) => string;
  types: typeof types;
  when: typeof when;
  unstable_conditional: <
    T extends {
      readonly default: unknown;
      readonly [$$Key$$: string]: unknown;
    },
  >(
    value: T,
  ) => T;
  unstable_defineVarsNested: <
    T extends { readonly [$$Key$$: string]: NestedVarsValue },
  >(
    tokens: T,
  ) => T;
  unstable_defineConstsNested: <
    T extends { readonly [$$Key$$: string]: NestedConstsValue },
  >(
    tokens: T,
  ) => T;
  unstable_createThemeNested: (
    baseTokens: { readonly [$$Key$$: string]: NestedStringValue },
    overrides: { readonly [$$Key$$: string]: NestedVarsValue },
  ) => CompiledStyles;
  __customProperties?: { [$$Key$$: string]: unknown };
};
export declare const legacyMerge: IStyleX;
export declare type legacyMerge = typeof legacyMerge;
