import type { Meta, StoryObj } from '@storybook/react';
import Box from '@mui/material/Box';
import { HelpBar } from './HelpBar';

const meta: Meta<typeof HelpBar> = {
  title: 'Molecules/HelpBar',
  component: HelpBar,
  tags: ['autodocs'],
  parameters: { layout: 'fullscreen' },
  decorators: [
    (Story) => (
      // Fake page content so the sticky footer has something to sit under.
      <Box sx={{ minHeight: 400, display: 'flex', flexDirection: 'column' }}>
        <Box sx={{ flex: 1, p: 4, bgcolor: 'background.default' }}>
          Page content scrolls above the help bar.
        </Box>
        <Story />
      </Box>
    ),
  ],
};

export default meta;
type Story = StoryObj<typeof HelpBar>;

/** Default — uses FA's standard support number. */
export const Default: Story = {};

/** Custom number — spaces preserved in the label, stripped in the tel link. */
export const CustomNumber: Story = {
  args: { phone: '1300 000 000' },
};
