import { z } from 'zod';
import {
  arithmeticExpressionSchema,
  arithmeticOperatorSchema,
  kartContextVariableSchema,
  simpleArithmeticStringSchema,
  contextArithmeticStringSchema,
} from './Utils.schema';

export type ArithmeticOperator = z.infer<typeof arithmeticOperatorSchema>;

/**
 * The Value is determined by an arithmetic operator followed by a number.
 */
export type SimpleArithmeticString = z.infer<typeof simpleArithmeticStringSchema>;

export type KartContextVariable = z.infer<typeof kartContextVariableSchema>;

export type ContextVariable = KartContextVariable;

export type ContextArithmeticString = z.infer<typeof contextArithmeticStringSchema>;

// Union of all possible expression formats
export type ArithmeticExpression = z.infer<typeof arithmeticExpressionSchema>;

// Create a type from the object values
export type ObjectValues<T> = T[keyof T];
