import { createDocumentation, createComponent } from "../../../globals/documentation/story";
import docs from "./pn-marketweb-table-docs.json";
import { angle_down } from "pn-design-assets/pn-assets/icons.js";
const { argTypes, textContent } = createDocumentation(docs);
const actionButtons = [
    {
        content: '',
        class: 'toggle-widget',
        appearance: 'light',
        variant: '',
        small: true,
        loading: false,
        icon: angle_down,
        leftIcon: false,
        tooltip: null,
        href: null,
        rel: null,
        download: null,
        form: null,
        buttonId: '1234567890',
    },
    {
        content: 'Start Chat',
        class: '',
        appearance: 'light',
        variant: 'outlined',
        small: true,
        loading: false,
        icon: '<svg class="pn-icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" d="M12.388 2c5.522 0 10 4.477 10 10s-4.478 10-10 10H2l1.355-4.064-.798-3.987a8.8 8.8 0 0 1-.17-1.717V12c0-5.523 4.478-10 10-10m8 10a8 8 0 0 0-16 0v.232q0 .67.13 1.325l.902 4.507L4.775 20h7.612a8 8 0 0 0 8-8m-12.5-1.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m6 1.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0m3-1.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3" clip-rule="evenodd"/></svg>',
        leftIcon: true,
        tooltip: null,
        href: 'https://localhost:51543/min-oversikt/#chat',
        rel: null,
        download: null,
        form: null,
        buttonId: null,
    },
];
const actionButtons2 = [
    {
        content: '',
        class: 'toggle-widget',
        appearance: 'light',
        variant: '',
        small: true,
        loading: false,
        icon: angle_down,
        leftIcon: false,
        tooltip: null,
        href: null,
        rel: null,
        download: null,
        form: null,
        buttonId: '1234567890',
    },
    {
        content: 'Continue Chat',
        class: '',
        appearance: 'light',
        variant: 'outlined',
        small: true,
        loading: false,
        icon: '<svg class="pn-icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" d="M12.388 2c5.522 0 10 4.477 10 10s-4.478 10-10 10H2l1.355-4.064-.798-3.987a8.8 8.8 0 0 1-.17-1.717V12c0-5.523 4.478-10 10-10m8 10a8 8 0 0 0-16 0v.232q0 .67.13 1.325l.902 4.507L4.775 20h7.612a8 8 0 0 0 8-8m-12.5-1.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m6 1.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0m3-1.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3" clip-rule="evenodd"/></svg>',
        leftIcon: true,
        tooltip: null,
        href: 'https://localhost:51543/min-oversikt/#chat',
        rel: null,
        download: null,
        form: null,
        buttonId: null,
        arialabel: 'Continue chat',
        iconOnly: false,
    },
];
const shipmentItem = {};
shipmentItem.imageUrl = 'https://picsum.photos/id/204/160/100';
shipmentItem.service = 'REK (500 g)';
shipmentItem.recipient = 'Bert Ljung';
shipmentItem.shipmentId = '1234567890';
shipmentItem.validUntil = '2023-05-21';
shipmentItem.number = '863 475 983';
shipmentItem.actionButtons = actionButtons;
const shipmentItems = [];
shipmentItems.push(shipmentItem);
const shipmentItem2 = Object.assign({}, shipmentItem);
shipmentItem2.recipient = 'Sune Andersson';
shipmentItem2.validUntil = undefined;
shipmentItem2.extra = 'Some data';
shipmentItem2.actionButtons = actionButtons2;
shipmentItems.push(shipmentItem2);
const headers = [
    { key: 'service', label: 'Service' },
    { key: 'recipient', label: 'Recipient' },
    { key: 'shipmentId', label: 'Shipment ID' },
    { key: 'validUntil', label: 'Valid Until' },
    { key: 'number', label: 'Number' },
    { key: 'extra', label: 'Extra' },
];
const meta = {
    title: 'Components/Widgets/Market Web Table',
    parameters: {
        actions: {},
        docs: {
            description: {
                story: textContent,
            },
        },
    },
    args: {
        mainHeading: 'Sending',
        preamble: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua',
        rows: JSON.stringify(shipmentItems),
        headers: JSON.stringify(headers),
        showHeadersInCells: true,
        imageColAriaHeader: 'Image Column',
        toggleDetailLabel: 'Visa detaljer',
        language: 'sv',
        checkForChat: false,
        shipmentType: 'Incoming',
        contentId: '150640',
        takeAmountRow: 2,
        shipmentCount: 20,
    },
    argTypes: {
        language: {
            values: [
                { name: 'English', value: 'en' },
                { name: 'Swedish', value: 'sv' },
                { name: 'Danish', value: 'da' },
                { name: 'Finnish', value: 'fi' },
                { name: 'Norwegian', value: 'no' },
            ],
        },
    },
};
export default meta;
export const MarketwebTable = {
    args: {
        takeAmountRow: 3
    },
    name: 'MarketWeb Table',
    render: args => {
        const component = createComponent('pn-marketweb-table', args);
        return component;
    }
};
export const MarketwebTableExample = {
    name: 'MarketWeb Table: Show th',
    render: MarketwebTable.render,
    args: {
        rows: JSON.stringify(shipmentItems),
        headers: JSON.stringify(headers),
        showHeadersInCells: false,
        cellHeaderLevel: 'h4',
        shipmentType: 'Incoming'
    },
};
//# sourceMappingURL=pn-marketweb-table.stories.js.map
