import { type Meta, type StoryObj } from '@storybook/react';

import SurveyParticipationHeader from '.';

const meta: Meta<typeof SurveyParticipationHeader> = {
  title:
    'Composed Components/PeopleExperience/SurveyResults/Participation/SurveyParticipationHeader',
  component: SurveyParticipationHeader,
  parameters: {
    layout: 'padded',
  },
  args: {
    participationRate: 72,
    completedCount: 144,
    labels: {
      participation: 'Participación',
      answers: 'Respuestas',
      total: 'Sobre un total de 200 personas',
      sendReminder: 'Enviar recordatorio',
    },
  },
};

export default meta;

type Story = StoryObj<typeof SurveyParticipationHeader>;

export const Default: Story = {};

export const WithReminderButton: Story = {
  args: {
    showReminderButton: true,
    onSendReminder: () => alert('Recordatorio enviado'),
  },
};

export const Loading: Story = {
  args: {
    isLoading: true,
  },
};

export const LoadingWithReminder: Story = {
  args: {
    isLoading: true,
    showReminderButton: true,
  },
};

export const LowParticipation: Story = {
  args: {
    participationRate: 15,
    completedCount: 30,
  },
};

export const FullParticipation: Story = {
  args: {
    participationRate: 100,
    completedCount: 200,
  },
};
