import { jsx as _jsx } from "react/jsx-runtime";
import CampaignMessage from '../components/CampaignMessage';
import { useState } from 'react';
const meta = {
    title: 'Components/CampaignMessage',
    component: CampaignMessage,
    parameters: {
        layout: 'centered',
    },
    tags: ['autodocs'],
    argTypes: {
        value: {
            control: 'text',
            description: 'The current text value of the editor',
        },
        placeholder: {
            control: 'text',
            description: 'Placeholder text shown when editor is empty',
        },
        maxLength: {
            control: 'number',
            description: 'Maximum number of characters allowed',
        },
    },
};
export default meta;
// Template component for stories that need state management
const CampaignMessageWithState = (args) => {
    const [value, setValue] = useState(args.value || '');
    return (_jsx("div", { style: { width: '600px', padding: '20px' }, children: _jsx(CampaignMessage, { ...args, value: value, handleChange: setValue }) }));
};
export const Default = {
    render: CampaignMessageWithState,
    args: {
        value: '',
        placeholder: 'Type your message...',
        maxLength: 369,
    },
};
export const WithTemplateVariables = {
    render: CampaignMessageWithState,
    args: {
        value: 'Hi {{.Full_Name}}, I work at {{.My_Full_Name}} and I noticed you work at {{.Current_Company}} as a {{.Current_Title}}. I would love to connect!',
        placeholder: 'Type your message...',
        maxLength: 369,
    },
};
export const CustomPlaceholder = {
    render: CampaignMessageWithState,
    args: {
        value: '',
        placeholder: 'Enter your personalized message here...',
        maxLength: 369,
    },
};
export const ShorterLimit = {
    render: CampaignMessageWithState,
    args: {
        value: 'This is a test message with {{.Full_Name}}',
        placeholder: 'Type your message...',
        maxLength: 100,
    },
};
export const MultipleTemplateVariables = {
    render: CampaignMessageWithState,
    args: {
        value: `Dear {{.Full_Name}},

I hope this message finds you well. I'm {{.My_First_Name}} from {{.Hiring_Company}}. 

I came across your profile and was impressed by your experience at {{.Current_Company}} as {{.Current_Title}}. We have an exciting opportunity that might interest you.

Would you be open to a brief conversation?

Best regards,
{{.My_Full_Name}}`,
        placeholder: 'Type your message...',
        maxLength: 500,
    },
};
