import { RotationTimeEndpoint, RotationTypeEndpoint } from 'myApi';

export type TypeUseEndpointFormConfiguration = {
  prohibitCdAccess: {
    valuePropName: string;
    component: JSX.Element;
    extra: string;
    name: string;
    key: string;
  };
  rotationSettings: {
    valuePropName: string;
    component: JSX.Element;
    name: string;
    key: string;
  };
  antivirusEnabled: {
    valuePropName: string;
    component: JSX.Element;
    name: string;
    key: string;
  };
  ip: {
    component: JSX.Element;
    extra: string;
    name: string;
    rules: (
      | { message: string; required: boolean }
      | (() => { validator(_: unknown, value: string): Promise<void> })
    )[];
    label: string;
    key: string;
  };
  description: {
    component: JSX.Element;
    name: string;
    label: string;
    key: string;
  };
  usbControlEnabled: {
    valuePropName: string;
    component: JSX.Element;
    extra: string;
    name: string;
    key: string;
  };
  whitelistAdmin: {
    valuePropName: string;
    component: JSX.Element;
    name: string;
    key: string;
  };
  port: {
    component: JSX.Element;
    extra: string;
    name: string;
    rules: { message: string; required: boolean }[];
    label: string;
    key: string;
  };
  antivirusRemoveInfectedFiles: {
    valuePropName: string;
    component: JSX.Element;
    name: string;
    key: string;
  };
  deviceControlEnabled: {
    valuePropName: string;
    component: JSX.Element;
    name: string;
    key: string;
  };
  name: {
    component: JSX.Element;
    extra: string;
    name: string;
    rules: (
      | { message: string; required: boolean }
      | { max: number; message: string }
    )[];
    label: string;
    key: string;
  };
  integrityControlEnabled: {
    valuePropName: string;
    component: JSX.Element;
    name: string;
    key: string;
  };
  integrityControlTimeout: {
    component: JSX.Element;
    extra: string;
    name: string;
    label: string;
    key: string;
  };
  whitelistEnabled: {
    valuePropName: string;
    component: JSX.Element;
    name: string;
    key: string;
  };
  antivirusStartScan: {
    valuePropName: string;
    component: JSX.Element;
    extra: string;
    name: string;
    key: string;
  };
  group: {
    component: JSX.Element;
    extra: string;
    name: string;
    label: string;
    key: string;
  };
};

export type TypeRotation = RotationTypeEndpoint | 0 | undefined;

export type TypePeriod = RotationTimeEndpoint | 0 | undefined;

export type TypeRotationBlockProps = { disabled: boolean };
