import { useState, useEffect } from 'react'
import Time from './Time';
import MixDate from './MixDate';
import { Space } from 'antd';
import FullScreen from './FullScreen';
import Exit from './Exit';
import { toPng } from '../../../utils/helper/helper';
import Weather from './Weather';
export default function Header(props) {
    return <>
        <div className='fill layout-h center'>
            <Time />
            <div className='divider' />
            <MixDate />
            <div className='divider' />
            <Weather />
        </div>
        <div className='title layout-v center ' style={{
            background: `url(${process.env.PUBLIC_URL}/images/标题背景.png)`,
            width: 775,
            height: 95,
            marginTop: -5
        }} >
            <img src={`${process.env.PUBLIC_URL}/images/红原县草地资源一张图.png`} alt="" style={{
                marginTop: 20
            }} />
        </div>
        <div className='fill layout-h center' style={{
            justifyContent: "flex-end"
        }}>
            <Space size={36}>
                <img alt='' src={toPng('首页')} title="首页" style={{
                    cursor: "pointer"
                }} />
                <FullScreen rootRef={props.rootRef} />
                <Exit />
            </Space>
        </div>
    </>;
}