import { useState } from 'react';
import { IconPicker } from '@pega/cosmos-react-core';
import { commonIconNames } from './IconPicker.mocks';
export default {
    title: 'Core/IconPicker',
    component: IconPicker,
    args: {
        set: 'budicon',
        defaultSelection: 'pegasus',
        label: 'IconPicker input',
        labelHidden: false,
        info: 'Type in or click to expand the Popover',
        placeholder: '',
        status: undefined,
        required: false,
        disabled: false,
        readOnly: false
    },
    argTypes: {
        set: { options: ['streamline', 'budicon'], control: { type: 'select' } },
        defaultSelection: { options: commonIconNames, control: { type: 'select', icons: true } },
        label: { control: { type: 'text' } },
        labelHidden: { control: { type: 'boolean' } },
        info: { control: { type: 'text', label: 'Helper text' } },
        placeholder: { control: { type: 'text' } },
        status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },
        required: { control: { type: 'boolean' } },
        disabled: { control: { type: 'boolean' } },
        readOnly: { control: { type: 'boolean' } }
    }
};
export const IconPickerDemo = (args) => {
    const [iconValue, setIconValue] = useState(args.defaultSelection);
    return (<IconPicker defaultSelection={iconValue} label={args.label} labelHidden={args.labelHidden} info={args.info} placeholder={args.placeholder} status={args.status} required={args.required} disabled={args.disabled} readOnly={args.readOnly} set={args.set} onBlur={args.onBlur} onSelect={(icon) => {
            setIconValue(icon);
        }}/>);
};
//# sourceMappingURL=IconPicker.stories.jsx.map