import {ObjectTypeDefinition} from '../../integration/extension.provider';

export const UTILS_COMMON_PROVIDER = 'UtilsCommonProvider';

export const HIDDEN_NAME_TYPE: ObjectTypeDefinition = {
  name: 'HiddenName',
  definition: {
    properties: {
      name: {
        'x-schema-form': {
          condition: 'false',
        },
      },
    },
  },
};

export const OPTIONAL_LABEL_TYPE: ObjectTypeDefinition = {
  name: 'OptionalLabel',
  inheritedTypesIds: [HIDDEN_NAME_TYPE.name],
  definition: {
    properties: {
      title: {
        'x-schema-form': {
          type: 'conditional-text',
          conditionalValue: {
            title: 'Specify a label',
          },
        },
      },
    },
  },
};

export const HIDDEN_LABEL_TYPE: ObjectTypeDefinition = {
  name: 'HiddenLabel',
  definition: {
    properties: {
      title: {
        'x-schema-form': {
          condition: 'false',
        },
      },
    },
  },
};
