import * as React from 'react';
import { ID_SHEET_INDICATOR } from '../../constants';
import RuntimeContext from '../../RuntimeContext';
import classnames from 'classnames';
import styles from '../index.less';

interface Props {}

class SheetIndicator extends React.PureComponent<Props> {
  context!: React.ContextType<typeof RuntimeContext>;
  static contextType = RuntimeContext;

  constructor(props: Props) {
    super(props);
  }

  render() {
    const state = this.context!.store.getState();
    return (
      <th
        id={`${ID_SHEET_INDICATOR}:${state.id}`}
        data-id={state.id}
        className={classnames(styles['indicator'])}
      ></th>
    );
  }
}

export default SheetIndicator;
