import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react';
import { Modal } from 'antd';
import styles from './index.less';
import Icon from '@/tenants-ui/SgIcon';
import cx from 'classnames';

export default ({ isAll, changeIsAll }) => {
  return (
    <div
      className={styles.changeBox}
      onClick={(event) => {
        event.stopPropagation();
        changeIsAll();
      }}
    >
      <div className={styles.firBox}>总控制</div> <div className={styles.firBox}>子设备</div>
      <div className={cx(styles.upBox, { [styles.rightBox]: !isAll })}>
        {isAll ? '总控制' : '子设备'}
      </div>
    </div>
  );
};
