import React, { useState } from "react";
import { StoryFn, Meta } from "@storybook/react";
import { Root } from "./index";
import { data } from "./test-data";

export default {
  title: "Unofficial/POIList",
  component: Root,
} as Meta<typeof Root>;

const Template: StoryFn<typeof Root> = () => (
  <Root
    options={{
      data,
      type: "poi",
      activePOI: {
        address: "783 De Bienville Rue",
        city: "Montréal",
        country: "Canada",
        lat: 45.526794,
        lng: -73.58316,
        name: "Illusion Théâtre Marionnettes",
        postalcode: "H2J1T8",
        province: "QC",
        url: "https://illusiontheatre.com",
        proximity: {
          linear_distance: 416,
        },
      },
    }}
  />
);

export const Primary = Template.bind({});
