import React, { useState } from 'react';
import PropTypes from 'prop-types';
import useModal from '../../vm-hooks/useModal';
import { Button, Space } from 'antd';
import { VtxGasVideoModal, VtxThemeProvider } from '@vtx/modals';

const demo1 = props => {
    const [visible, setVisible] = useState(false);
    const [theme, setTheme] = useState('light');
    const showModal = theme => {
        setVisible(true);
        setTheme(theme);
    };
    const handleCancel = () => {
        setVisible(false);
    };
    return (
        <VtxThemeProvider value={{ theme }}>
            <Space>
                <Button type="primary" onClick={() => showModal('light')}>
                    基本模态框
                </Button>
                <Button type="primary" onClick={() => showModal('dark')}>
                    深色的入户安检模态框
                </Button>
                <VtxGasVideoModal
                    onCancel={handleCancel}
                    billId="中邑燃气（办公）"
                    visible={visible}
                />
            </Space>
        </VtxThemeProvider>
    );
};

export default demo1;
