import type { TourStepProps } from 'antd';
import type { TourStepContext } from '../types';
import { domTarget } from '../types';

export function campaignsSteps(ctx: TourStepContext): TourStepProps[] {
  if (ctx.settings.enableInfluence === false) {
    return [];
  }

  return [
    {
      title: 'Advocacy Campaigns',
      description:
        'Campaigns let your supporters write letters to elected representatives. You create the campaign, set talking points, and supporters send personalized emails.',
      target: null,
    },
    {
      title: 'Campaign List',
      description:
        'This table shows all your campaigns. Filter by status — Draft, Active, Closed, or Archived — and search by title.',
      target: domTarget('[data-tour-campaigns-table]'),
      placement: 'bottom',
    },
    {
      title: 'Create a Campaign',
      description:
        'Click here to create a new campaign. You will set a title, choose the government level (federal, provincial, municipal), write talking points, and draft a letter template.',
      target: domTarget('[data-tour-campaigns-create]'),
      placement: 'bottom',
    },
    {
      title: 'Campaign Status',
      description:
        'Campaigns move through stages: Draft (not visible to public), Active (accepting submissions), Closed (read-only), and Archived.',
      target: domTarget('[data-tour-campaigns-status]'),
      placement: 'right',
    },
    {
      title: 'Campaign Actions',
      description:
        'Each campaign has actions: edit details, view submitted emails, preview the public page, and copy the shareable link.',
      target: domTarget('[data-tour-campaigns-actions]'),
      placement: 'left',
    },
    {
      title: 'Response Moderation',
      description:
        'Submitted letters appear in the Responses section for moderation. You can approve, edit, or reject submissions before they are sent to representatives.',
      target: null,
    },
    {
      title: 'Email Queue',
      description:
        'Approved letters queue up in Outgoing Emails. Monitor delivery status and retry failed sends from there.',
      target: null,
    },
  ];
}
