import { ComponentSchema, fields } from '@keystatic/core';

export const createNumOperatorField = (): ComponentSchema =>
  fields.select({
    label: 'Operator',
    options: [
      {
        label: '>=',
        value: 'gte',
      },
      {
        label: '>',
        value: 'gt',
      },
      {
        label: '=',
        value: 'eq',
      },
      {
        label: '<',
        value: 'lt',
      },
      {
        label: '<=',
        value: 'lte',
      },
    ],
    defaultValue: 'eq',
  });
