import { detailedGroups as o, searchConfigGroup as t } from "../constants/index.js";
import { P as n } from "../../../../packageName-CJwD6mUt.js";
import e from "../utils/stringifyCommandGroup.js";
const s = `import { 
  Box, 
  Text, 
  Command, 
  CommandGroup, 
  CommandItem, 
  COMMAND_VARIANT, 
  SearchConfigHandler 
} from '${n}';
import React, { useCallback, useState } from 'react';

interface ISearchConfigCommandProps {}

const detailedGroups: CommandGroup[] = ${e(o)};

const searchConfigGroup: CommandGroup[] = ${e(t)};

const SearchConfigCommand: React.FC<ISearchConfigCommandProps> = () => {
  const [selectedConfig, setSelectedConfig] = useState<string[]>(['gtin', 'contains']);

  const searchConfig: SearchConfigHandler = {
    groups: searchConfigGroup,
    onSelectionChange: (selectedItems, currentInputValue) => {
      setSelectedConfig(selectedItems);
      console.log('Search config selection changed:', selectedItems, 'Input value:', currentInputValue);
    },
    defaultSelectedItem: selectedConfig,
  };

  const handleItemSelect = useCallback(
    (item: CommandItem) => {
      console.log('Selected item with config:', item, 'Config:', selectedConfig);
    },
    [selectedConfig],
  );

  return (
    <Box className="space-y-4">
      <Command
        variant={COMMAND_VARIANT.SIMPLE}
        groups={detailedGroups}
        searchConfig={searchConfig}
        placeholder="Search with options..."
        onItemSelect={handleItemSelect}
      />
      <Box className="p-3 bg-[var(--soft-bg-coral)] rounded-md text-sm">
        <strong>Current search config:</strong> {Array.from(selectedConfig).join(', ') || 'None selected'}
      </Box>
    </Box>
  );
};

export default SearchConfigCommand;`;
export {
  s as default
};
//# sourceMappingURL=searchConfigCommandSource.js.map
