import * as React from 'react'; import { Chip } from './Chip/Chip'; import type { ChipOption, ChipOptionLabel, ChipOptionValue, RenderChipProps } from './types'; export const DEFAULT_VALUE: never[] = []; export const DEFAULT_INPUT_VALUE = ''; export function getOptionValueDefault(option: O): ChipOptionValue { return option.value; } export function getOptionLabelDefault(option: O): ChipOptionLabel { return option.label; } export function getNewOptionDataDefault( value: ChipOptionValue, label: ChipOptionLabel, ): O { // eslint-disable-next-line @typescript-eslint/consistent-type-assertions return { value, label, } as O; } export function renderChipDefault(props: RenderChipProps): React.ReactNode { const { label, ...rest } = props; return ( {label} ); }