import type {NumberAbsolute, PositiveNumericStringGt} from './internal';
import type {IsEqual} from './is-equal';
import type {PositiveInfinity, NegativeInfinity, IsNegative} from './numeric';
import type {And} from './and';
import type {Or} from './or';
/**
Returns a boolean for whether a given number is greater than another number.
@example
```
import type {GreaterThan} from 'type-fest';
GreaterThan<1, -5>;
//=> true
GreaterThan<1, 1>;
//=> false
GreaterThan<1, 5>;
//=> false
```
*/
export type GreaterThan = number extends A | B
? never
: [
IsEqual, IsEqual,
IsEqual, IsEqual,
] extends infer R extends [boolean, boolean, boolean, boolean]
? Or<
And, IsEqual>,
And, IsEqual>
> extends true
? true
: Or<
And, IsEqual>,
And, IsEqual>
> extends true
? false
: true extends R[number]
? false
: [IsNegative, IsNegative] extends infer R extends [boolean, boolean]
? [true, false] extends R
? false
: [false, true] extends R
? true
: [false, false] extends R
? PositiveNumericStringGt<`${A}`, `${B}`>
: PositiveNumericStringGt<`${NumberAbsolute}`, `${NumberAbsolute}`>
: never
: never;