/**
 * 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 { TStyleValue } from '../common-types';

/**
 * Shorthand properties:
 * - [x] all - Should be banned
 * - [x] animation
 * - [x] background
 * - [x] border
 * - [x] border-block-end
 * - [x] border-block-start
 * - [x] border-bottom
 * - [x] border-color
 * - [x] border-image
 * - [x] border-inline-end
 * - [x] border-inline-start
 * - [x] border-left
 * - [x] border-radius
 * - [x] corner-shape
 * - [x] border-right
 * - [x] border-style
 * - [x] border-top
 * - [x] border-width
 * - [x] column-rule
 * - [x] columns
 * - [x] container
 * - [x] flex
 * - [x] flex-flow
 * - [x] font
 * - [x] gap
 * - [x] grid
 * - [x] grid-area
 * - [x] grid-column
 * - [x] grid-row
 * - [x] grid-template
 * - [x] inset
 * - [x] inset-block
 * - [x] inset-inline
 * - [x] list-style
 * - [x] margin
 * - [x] mask
 * - [x] offset
 * - [x] outline
 * - [x] overflow
 * - [x] padding
 * - [x] place-content
 * - [x] place-items
 * - [x] place-self
 * - [x] scroll-margin
 * - [x] scroll-padding
 * - [x] text-decoration
 * - [x] text-emphasis
 * - [x] transition
 */

type TReturn = $ReadOnlyArray<[string, TStyleValue]>;

declare const shorthands: $ReadOnly<{
  [key: string]: (TStyleValue) => TReturn,
}>;

declare const aliases: {
  // @Deprecated
  borderHorizontal: typeof shorthands.borderInline,
  // @Deprecated
  borderVertical: typeof shorthands.borderBlock,
  // @Deprecated
  borderBlockStart: typeof shorthands.borderTop,
  // @Deprecated
  borderEnd: typeof shorthands.borderInlineEnd,
  // @Deprecated
  borderBlockEnd: typeof shorthands.borderBottom,
  // @Deprecated
  borderStart: typeof shorthands.borderInlineStart,
  blockSize: (val: TStyleValue) => TReturn,
  inlineSize: (val: TStyleValue) => TReturn,
  minBlockSize: (val: TStyleValue) => TReturn,
  minInlineSize: (val: TStyleValue) => TReturn,
  maxBlockSize: (val: TStyleValue) => TReturn,
  maxInlineSize: (val: TStyleValue) => TReturn,
  borderHorizontalWidth: typeof shorthands.borderInlineWidth,
  borderHorizontalStyle: typeof shorthands.borderInlineStyle,
  borderHorizontalColor: typeof shorthands.borderInlineColor,
  borderVerticalWidth: typeof shorthands.borderBlockWidth,
  borderVerticalStyle: typeof shorthands.borderBlockStyle,
  borderVerticalColor: typeof shorthands.borderBlockColor,
  borderBlockStartColor: (value: TStyleValue) => TReturn,
  borderBlockEndColor: (value: TStyleValue) => TReturn,
  borderBlockStartStyle: (value: TStyleValue) => TReturn,
  borderBlockEndStyle: (value: TStyleValue) => TReturn,
  borderBlockStartWidth: (value: TStyleValue) => TReturn,
  borderBlockEndWidth: (value: TStyleValue) => TReturn,
  borderStartColor: typeof shorthands.borderInlineStartColor,
  borderEndColor: typeof shorthands.borderInlineEndColor,
  borderStartStyle: typeof shorthands.borderInlineStartStyle,
  borderEndStyle: typeof shorthands.borderInlineEndStyle,
  borderStartWidth: typeof shorthands.borderInlineStartWidth,
  borderEndWidth: typeof shorthands.borderInlineEndWidth,
  borderTopStartRadius: (value: TStyleValue) => TReturn,
  borderTopEndRadius: (value: TStyleValue) => TReturn,
  borderBottomStartRadius: (value: TStyleValue) => TReturn,
  borderBottomEndRadius: (value: TStyleValue) => TReturn,
  containIntrinsicBlockSize: (value: TStyleValue) => TReturn,
  containIntrinsicInlineSize: (value: TStyleValue) => TReturn,
  gridGap: typeof shorthands.gap,
  gridRowGap: (value: TStyleValue) => TReturn,
  gridColumnGap: (value: TStyleValue) => TReturn,
  marginBlockStart: (value: TStyleValue) => TReturn,
  marginBlockEnd: (value: TStyleValue) => TReturn,
  marginStart: typeof shorthands.marginInlineStart,
  marginEnd: typeof shorthands.marginInlineEnd,
  marginHorizontal: typeof shorthands.marginInline,
  marginVertical: typeof shorthands.marginBlock,
  overflowBlock: (value: TStyleValue) => TReturn,
  overflowInline: (value: TStyleValue) => TReturn,
  paddingBlockStart: (rawValue: TStyleValue) => TReturn,
  paddingBlockEnd: (rawValue: TStyleValue) => TReturn,
  paddingStart: typeof shorthands.paddingInlineStart,
  paddingEnd: typeof shorthands.paddingInlineEnd,
  paddingHorizontal: typeof shorthands.paddingInline,
  paddingVertical: typeof shorthands.paddingBlock,
  scrollMarginBlockStart: (value: TStyleValue) => TReturn,
  scrollMarginBlockEnd: (value: TStyleValue) => TReturn,
  insetBlockStart: (value: TStyleValue) => TReturn,
  insetBlockEnd: (value: TStyleValue) => TReturn,
  start: typeof shorthands.insetInlineStart,
  end: typeof shorthands.insetInlineEnd,
};

declare export default $ReadOnly<{
  ...typeof shorthands,
  ...typeof aliases,
}>;
