diff --git a/apps/nextjs/src/components/AppComponents/Chat/chat-right-hand-side-lesson.stories.tsx b/apps/nextjs/src/components/AppComponents/Chat/chat-right-hand-side-lesson.stories.tsx new file mode 100644 index 000000000..8325a0957 --- /dev/null +++ b/apps/nextjs/src/components/AppComponents/Chat/chat-right-hand-side-lesson.stories.tsx @@ -0,0 +1,68 @@ +import type { Message } from "@oakai/aila/src/core/chat"; +import type { Meta, StoryObj } from "@storybook/react"; +import { fn } from "@storybook/test"; + +import { chromaticParams } from "@/storybook/chromatic"; +import { ChatDecorator } from "@/storybook/decorators/ChatDecorator"; +import { + DemoDecorator, + demoParams, +} from "@/storybook/decorators/DemoDecorator"; + +import ChatRightHandSideLesson from "./chat-right-hand-side-lesson"; + +const DummyUserMessage: Message = { + id: "123", + role: "user", + content: "Dummy message", +}; + +const DummyAssistantMessage: Message = { + id: "123", + role: "assistant", + content: "Dummy message", +}; + +const DummyMessages: Message[] = [DummyUserMessage, DummyAssistantMessage]; + +const meta = { + title: "Components/LessonPlan/ChatRightHandSideLesson", + component: ChatRightHandSideLesson, + tags: ["autodocs"], + decorators: [ChatDecorator, DemoDecorator], + args: { + showLessonMobile: true, + closeMobileLessonPullOut: fn, + demo: { isDemoUser: false, isSharingEnabled: true, demo: undefined }, + }, + parameters: { + viewport: { + defaultViewport: "mobile", + }, + ...chromaticParams(["mobile"]), + chatContext: { + lessonPlan: { + subject: "biology", + keyStage: "key-stage-3", + title: "About Frogs", + }, + messages: DummyMessages, + }, + ...demoParams({ isDemoUser: false }), + }, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Default: Story = { + args: {}, +}; + +export const OnlyOneMessage: Story = { + parameters: { + chatContext: { + messages: [DummyUserMessage], + }, + }, +};