import type { Meta, StoryObj } from '@storybook/react';
import Box from '@mui/material/Box';
import { FuneralFinder } from './FuneralFinder';
import { Navigation } from '../Navigation';
import { Typography } from '../../atoms/Typography';
// ─── Shared data ────────────────────────────────────────────────────────────
const funeralTypes = [
{ id: 'cremation', label: 'Cremation', hasServiceOption: true },
{ id: 'burial', label: 'Burial', hasServiceOption: true },
{
id: 'water-burial',
label: 'Water Burial',
note: 'Available in QLD only',
hasServiceOption: false,
},
];
const themeOptions = [
{ id: 'eco-friendly', label: 'Eco-friendly' },
{ id: 'budget-friendly', label: 'Budget-friendly' },
{ id: 'religious', label: 'Religious specialisation' },
];
const FALogoNav = () => (
);
// ─── Meta ───────────────────────────────────────────────────────────────────
const meta: Meta = {
title: 'Archive/FuneralFinder V1',
component: FuneralFinder,
tags: ['autodocs'],
parameters: { layout: 'centered' },
decorators: [
(Story) => (
),
],
};
export default meta;
type Story = StoryObj;
// ─── Default ────────────────────────────────────────────────────────────────
/** Initial state — full feature set with types, themes, and explore-all. */
export const Default: Story = {
args: {
funeralTypes,
themeOptions,
onSearch: (params) => alert(JSON.stringify(params, null, 2)),
},
};
// ─── Without Themes ─────────────────────────────────────────────────────────
/** No theme options — skips the preferences section on the final step. */
export const WithoutThemes: Story = {
args: {
funeralTypes,
onSearch: (params) => alert(JSON.stringify(params, null, 2)),
},
};
// ─── Without Explore All ────────────────────────────────────────────────────
/** Explore-all option hidden — users must pick a specific type. */
export const WithoutExploreAll: Story = {
args: {
funeralTypes,
themeOptions,
showExploreAll: false,
onSearch: (params) => alert(JSON.stringify(params, null, 2)),
},
};
// ─── Loading State ──────────────────────────────────────────────────────────
/** CTA in loading state — shows spinner, button disabled. */
export const Loading: Story = {
args: {
funeralTypes,
themeOptions,
loading: true,
onSearch: (params) => alert(JSON.stringify(params, null, 2)),
},
};
// ─── Custom Heading ─────────────────────────────────────────────────────────
/** Custom heading and subheading for alternate page contexts. */
export const CustomHeading: Story = {
args: {
funeralTypes,
themeOptions,
heading: 'Compare funeral directors in your area',
subheading: 'Transparent pricing · No hidden fees · 24/7',
onSearch: (params) => alert(JSON.stringify(params, null, 2)),
},
};
// ─── In Hero Context (Desktop) ──────────────────────────────────────────────
/** As it appears in the homepage hero — desktop layout. */
export const InHeroDesktop: Story = {
decorators: [
(Story) => (
),
],
render: () => (
}
items={[
{ label: 'Provider Portal', href: '/provider-portal' },
{ label: 'FAQ', href: '/faq' },
{ label: 'Contact Us', href: '/contact' },
{ label: 'Log in', href: '/login' },
]}
/>
Discover, Explore, and Plan Funerals in Minutes
Whether you're thinking ahead or arranging for a loved one, find trusted local
providers with transparent pricing.
alert(JSON.stringify(params, null, 2))}
/>
),
};
// ─── In Hero Context (Mobile) ───────────────────────────────────────────────
/** Mobile viewport — stacked layout with image above search. */
export const InHeroMobile: Story = {
decorators: [
(Story) => (
),
],
render: () => (
}
items={[
{ label: 'FAQ', href: '/faq' },
{ label: 'Contact Us', href: '/contact' },
{ label: 'Log in', href: '/login' },
]}
/>
Discover, Explore, and Plan Funerals in Minutes
Find trusted local providers with transparent pricing, at your own pace.
alert(JSON.stringify(params, null, 2))}
/>
),
};