import { TaggedVariant, VariantTag } from "@fabric/core";
import { BaseField } from "./base-field.js";

// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface TimestampFieldOptions extends BaseField {}

export interface TimestampField
  extends TaggedVariant<"TimestampField">,
    TimestampFieldOptions {}

export function createTimestampField<T extends TimestampFieldOptions>(
  opts: T = {} as T,
): TimestampField & T {
  return {
    [VariantTag]: "TimestampField",
    ...opts,
  } as const;
}
