import { html } from 'lit-html'

export default {
    title: 'GES DISC/User Dashboard/Export Dialog',
    component: 'gd-user-dashboard-export-dialog',
}

function getDialog() {
    return new Promise(resolve => {
        let dialog = document.querySelector('gd-user-dashboard-export-dialog')

        if (!dialog) {
            setTimeout(async () => resolve(await getDialog()), 500)
            return
        }

        resolve(dialog)
    })
}

export const example = (props) => {
    getDialog().then(dialog => {
        // add a couple fake history item ids
        dialog.historyItemIds = [1, 2]
    })

    return html`
        <gd-user-dashboard-export-dialog 
            show="true"
            canShareAsUrl="true"
        />
    `
}

example.argTypes = {}

example.args = {}
