import React from "react";
import { Meta, StoryObj } from "@storybook/react-webpack5";
import { Dashboard } from "./Dashboard";
import { Wrapper } from "../Wrapper/Wrapper";

const meta: Meta<typeof Dashboard> = {
  component: Dashboard,
  title: "Layouts/Dashboard",
  argTypes: {
    variant: {
      options: ["default", "pdf", "pptx"],
      control: { type: "radio" },
    },
  },
};
export default meta;

type Story = StoryObj<{
  token: string;
  baseUrl: string;
  id: string;
  adminMode: boolean;
  variant: "default" | "pdf" | "pptx";
  googleMapsApiKey: string;
}>;

export const Standalone: Story = {
  render: (args) => {
    return (
      <div className="onvo-h-screen onvo-w-screen">
        <Wrapper {...args}>
          <Dashboard id={args.id} variant={args.variant}></Dashboard>
        </Wrapper>
      </div>
    );
  },

  args: {
    token:
      "eyJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoiYXV0aGVudGljYXRlZCIsImFwcF9tZXRhZGF0YSI6eyJkYXNoYm9hcmRzIjpbImNmY2M4ZWQ3LTJkOTAtNGUxNy1hYjUyLWJiODM1NTMwYzNiNyJdLCJwYXJlbnRfdGVhbSI6ImVlNWIwOGM2LTUxNjctNDQyNS1iYmMzLWE3NDZmZTRhN2VhZCJ9LCJzdWIiOiJnSTNsblFPTGFYaU9JMkRleG9KRUNsQkVhMmRBM3pFcyIsImF1ZCI6ImF1dGhlbnRpY2F0ZWQiLCJpYXQiOjE3NTg3MTc4OTd9.RWHV3nfOPxf2Y-GRh3sG2b4CORmHoGlvkUR64rSLJd0",
    baseUrl: "http://localhost:3004",
    id: "cfcc8ed7-2d90-4e17-ab52-bb835530c3b7",
    variant: "default",
    adminMode: true,
    googleMapsApiKey: "AIzaSyDqUZ6lVdQA-9iBpfI1q4mSCH9seg2E-7M",
  },

  parameters: { layout: "fullscreen" },
};
