import * as t from "yup";
const n = () => t.object().shape({
  start: t.date().nullable(),
  end: t.date().nullable()
}).nullable(), a = () => t.array().of(t.mixed()), o = {
  /**
   * Returns true if this strategy applies to the field (i.e. field is a date range).
   * @param field - Form field to check (uses fieldType.componentId and fieldType.id).
   * @returns True if the field is a date range field (RHFDateRangePicker or fft_date_range).
   */
  applies(e) {
    return e.fieldType.componentId === "RHFDateRangePicker" || e.fieldType.id === "fft_date_range";
  },
  create() {
    return n();
  }
}, c = {
  /**
   * Returns true if this strategy applies to the field (checkable list or days of week).
   * @param field - Form field to check.
   * @returns True if the field is RHFCheckableList, RHFDaysOfWeekPicker, or fft_checkable_list.
   */
  applies(e) {
    const r = e.fieldType.componentId;
    return r === "RHFCheckableList" || r === "RHFDaysOfWeekPicker" || e.fieldType.id === "fft_checkable_list";
  },
  /** Returns a Yup array-of-mixed schema for the field. */
  create() {
    return a();
  }
}, p = {
  /**
   * Returns true if this strategy applies to the field (number/integer/double type).
   * @param field - Form field to check.
   * @returns True if the field is RHFNumberInput or fft_number, fft_integer, fft_double.
   */
  applies(e) {
    const r = e.fieldType.id;
    return e.fieldType.componentId === "RHFNumberInput" || r === "fft_number" || r === "fft_integer" || r === "fft_double";
  },
  /** Returns a Yup number schema for the field. */
  create() {
    return t.number();
  }
}, l = {
  /**
   * Returns true if this strategy applies to the field (checkbox/boolean type).
   * @param field - Form field to check (uses fieldType.componentId and fieldType.id).
   * @returns True if the field is RHFCheckbox or fft_boolean or fft_checkbox.
   */
  applies(e) {
    const r = e.fieldType.id;
    return e.fieldType.componentId === "RHFCheckbox" || r === "fft_boolean" || r === "fft_checkbox";
  },
  /** Returns a Yup boolean schema for the field. */
  create() {
    return t.boolean();
  }
}, i = {
  /**
   * Returns true if this strategy applies to the field (RHFRadioGroup).
   * @param field - Form field to check.
   * @returns True if the field is RHFRadioGroup.
   */
  applies(e) {
    return e.fieldType.componentId === "RHFRadioGroup";
  },
  /** Returns a Yup mixed schema for string or number (selected option value). */
  create() {
    return t.mixed();
  }
}, s = {
  /**
   * Returns true if this strategy applies to the field (RHFSelect).
   * @param field - Form field to check.
   * @returns True if the field is RHFSelect.
   */
  applies(e) {
    return e.fieldType.componentId === "RHFSelect";
  },
  /** Returns a Yup string or array schema depending on isMultiple. */
  create(e) {
    return e.fieldType.rhfComponentProps?.isMultiple === !0 ? a() : t.string();
  }
}, u = {
  /**
   * Returns true if this strategy applies to the field (RHFAutoComplete).
   * @param field - Form field to check.
   * @returns True if the field is RHFAutoComplete.
   */
  applies(e) {
    return e.fieldType.componentId === "RHFAutoComplete";
  },
  /** Returns a Yup mixed/array schema depending on isMultiple. */
  create(e) {
    return e.fieldType.rhfComponentProps?.isMultiple === !0 ? t.array().of(t.mixed()) : t.mixed().nullable();
  }
}, d = {
  applies(e) {
    return e.fieldType.componentId === "RHFTextField";
  },
  create() {
    return t.string();
  }
}, m = {
  applies() {
    return !0;
  },
  create() {
    return t.string();
  }
}, f = [
  o,
  c,
  p,
  l,
  i,
  s,
  u,
  d,
  m
];
export {
  f as BASE_SCHEMA_STRATEGIES,
  u as autocompleteBaseSchemaStrategy,
  l as booleanBaseSchemaStrategy,
  c as checkableListBaseSchemaStrategy,
  o as dateRangeBaseSchemaStrategy,
  m as defaultStringBaseSchemaStrategy,
  p as numberBaseSchemaStrategy,
  i as radioGroupBaseSchemaStrategy,
  s as selectBaseSchemaStrategy,
  d as textFieldBaseSchemaStrategy
};
