import { useState } from 'react';
import styles from './index.less';
import { Input, Modal } from 'antd';
import ButtonComp from '@/components/ButtonComp';

export default function Page() {
  const [unitName, setUnitName] = useState<any>('');
  const [visibility, setVisibility] = useState<boolean>(false);

  return (
    <div>
      <div onClick={() => setVisibility(true)}>单位位置管理</div>

      {/* 开机认证 */}
      <Modal
        title="位置信息"
        open={visibility}
        centered
        width={500}
        onCancel={() => setVisibility(false)}
        footer={null}
        maskClosable={false}
      >
        <div>请通过定位按钮在地图上自定义位置</div>

        <div className='mb20 mt20'>
          <div className='flex_aiC'>
            <span style={{ marginRight: 4, color: 'red' }}>*</span>单位名称
            <Input placeholder="请输入单位名称" style={{ width: 300, marginLeft: 14 }}
              value={unitName}
              onChange={(e) => setUnitName(e.target.value)}
            />
          </div>
        </div>

        <div className='flex_jE mt20'>
          <ButtonComp style={{marginRight: 20}} text={'定位'} onClick={() => setVisibility(false)} />
          <ButtonComp style={{marginRight: 20}} text={'确定'} onClick={() => setVisibility(false)} />
          <ButtonComp type='cancel' text={'取消'} onClick={() => setVisibility(false)} />
        </div>
      </Modal>
    </div>
  );
}
