import * as React from 'react';
import { Radio, PageHeaderFoot, Button, AutoTableContainer, Pagination, Table, Prompt } from 'kts-xui';
import Default from './UI.Default'
export default class Component extends React.Component<any, any> {

    constructor(props: any) {
        super(props);
        this.state = {
            btnMode: 'default'
        };
    }


    onButtonChange = (e) => {
        this.setState({
            btnMode: e.target.value
        })
    }
    topExpand = () => {
        const { btnMode } = this.state;
        return (
            <div style={{ flex: 'none' }}>
                <Radio.Group defaultValue='default' onChange={this.onButtonChange}>
                    <Radio.Button value='default' type={btnMode === 'default' ? 'primary' : 'default'} style={{ marginRight: 10 }}>默认有效性</Radio.Button>
                </Radio.Group>
                {/* <Button type={btnMode === 'customer' ? 'primary' : 'default'} onClick={() => { this.onButtonChange('customer'); }} style={{ marginRight: 10 }}>有效性设置</Button> */}
                {/* <Prompt><Icon type="info-circle" />默认有效性适用于与有效性设置中未设置的所有公司</Prompt> */}
            </div>);
    }

    render() {
        const { btnMode } = this.state;
        return (

            <div style={{ height: '100%', display: 'flex', flexDirection: 'column', zIndex: 1, overflow: 'auto' }}>
                <div style={{ flex: 'none' }}>
                    <PageHeaderFoot
                        expandLeft={this.topExpand()}
                    >
                    </PageHeaderFoot>
                </div>
                {btnMode === 'default' && <Default />}
            </div>
        );
    }
}