/**
 * 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.
 *
 * @flow strict
 */

import type {
  InjectableStyle as _InjectableStyle,
  CompiledNamespaces as _CompiledNamespaces,
  MutableCompiledNamespaces as _MutableCompiledNamespaces,
  StyleXOptions as _StyleXOptions,
} from './common-types';

export type {
  RawStyles,
  StyleRule,
  TNestableStyleValue,
  TRawValue,
  TStyleValue,
} from './common-types';

// All functions exposed from `stylex` are defined in a way that can be run
// entirely in the browser.

// These are the implementations of those functions.

import styleXCreateSet from './stylex-create';
import styleXDefineVars from './stylex-define-vars';
import styleXDefineConsts from './stylex-define-consts';
import styleXCreateTheme from './stylex-create-theme';
import stylexKeyframes from './stylex-keyframes';
import stylexPositionTry from './stylex-position-try';
import stylexFirstThatWorks from './stylex-first-that-works';
import hash from './hash';
import genFileBasedIdentifier from './utils/file-based-identifier';
import styleXDefineVarsNested from './stylex-define-vars-nested';
import styleXDefineConstsNested from './stylex-define-consts-nested';
import styleXCreateThemeNested from './stylex-create-theme-nested';
import * as m from './messages';
import {
  PSEUDO_CLASS_PRIORITIES as _PSEUDO_CLASS_PRIORITIES,
  AT_RULE_PRIORITIES as _AT_RULE_PRIORITIES,
  PSEUDO_ELEMENT_PRIORITY as _PSEUDO_ELEMENT_PRIORITY,
} from '@stylexjs/shared';

export * as types from './types';
export * as when from './when/when';

declare export const create: typeof styleXCreateSet;
declare export const defineVars: typeof styleXDefineVars;
declare export const defineConsts: typeof styleXDefineConsts;
declare export const createTheme: typeof styleXCreateTheme;
declare export const keyframes: typeof stylexKeyframes;
declare export const positionTry: typeof stylexPositionTry;
declare export const utils: {
  hash: typeof hash,
  genFileBasedIdentifier: typeof genFileBasedIdentifier,
};
declare export const messages: typeof m;
declare export const firstThatWorks: typeof stylexFirstThatWorks;
declare export const defineVarsNested: typeof styleXDefineVarsNested;
declare export const defineConstsNested: typeof styleXDefineConstsNested;
declare export const createThemeNested: typeof styleXCreateThemeNested;
declare export const PSEUDO_CLASS_PRIORITIES: typeof _PSEUDO_CLASS_PRIORITIES;
declare export const AT_RULE_PRIORITIES: typeof _AT_RULE_PRIORITIES;
declare export const PSEUDO_ELEMENT_PRIORITY: typeof _PSEUDO_ELEMENT_PRIORITY;

export type InjectableStyle = _InjectableStyle;
export type CompiledNamespaces = _CompiledNamespaces;
export type MutableCompiledNamespaces = _MutableCompiledNamespaces;
export type StyleXOptions = _StyleXOptions;
