import { useState } from 'react';
import { ConditionInput } from '@pega/cosmos-react-condition-builder';
export default {
    title: 'Condition Builder/ConditionInput',
    component: ConditionInput
};
export const ConditionInputDemo = (args) => {
    const [condition, setCondition] = useState();
    const field = {
        name: 'Field Value',
        type: args.fieldType
    };
    return (<ConditionInput field={field} mode={args.mode} condition={condition} onChange={setCondition}/>);
};
ConditionInputDemo.args = {
    fieldType: 'TEXT',
    mode: 'advanced'
};
ConditionInputDemo.argTypes = {
    fieldType: {
        options: [
            'TEXT',
            'INTEGER',
            'BOOLEAN',
            'DECIMAL',
            'EMAIL',
            'URL',
            'PERCENTAGE',
            'CURRENCY',
            'PHONE',
            'DATE_ONLY',
            'TIME_ONLY',
            'DATE_TIME',
            'PICKLIST'
        ],
        control: { type: 'select' }
    },
    mode: { options: ['default', 'advanced'], control: { type: 'select' } }
};
//# sourceMappingURL=ConditionInput.stories.jsx.map