import { isEqual } from 'lodash'; import React from 'react'; import { HelpField } from '../../help/HelpField'; import type { IFormInputProps } from '../../presentation'; import { createFakeReactSyntheticEvent } from '../../presentation'; export interface IPlatformHealthOverrideProps { interestingHealthProviderNames: string[]; onChange: (healthProviderNames: string[]) => void; platformHealthType: string; showHelpDetails?: boolean; } export class PlatformHealthOverride extends React.Component { private clicked = (event: React.ChangeEvent) => { const interestingHealthProviderNames = event.target.checked ? [this.props.platformHealthType] : null; this.props.onChange(interestingHealthProviderNames); }; public render() { return (
{' '}
); } } export function PlatformHealthOverrideInput( props: IFormInputProps & { platformHealthType: string; showHelpDetails?: boolean }, ) { const { value, onChange, platformHealthType, showHelpDetails, ...rest } = props; return ( { onChange(createFakeReactSyntheticEvent({ name: rest.name, value: newVal })); }} /> ); }