import { CheckboxFilterInputOption } from '../core';
import { Option } from '../types';

export function getOptionKeyHelper(
  option: CheckboxFilterInputOption | Option,
): string {
  // Use key if available, otherwise fallback to value or label
  const key = String(option.key || option.value || option.label || '');
  return key === 'undefined' ? '' : key;
}
