import React, { useState, useEffect } from 'react';

// Redux part
import { useSelector, useDispatch } from 'react-redux';
import { StoreState } from 'store/rootReducer';

// Import actions here

import classNames from 'classnames/bind';
import TextItem from 'components/items/TextItem';
import styleIdentifiers from './popup.scss';

// assets
import editAsset from './assets/edit-asset.svg';

const styles = classNames.bind(styleIdentifiers);

export interface StateProps {}

export interface DispatchProps {}

export interface OwnProps {}

export type PopupProps = StateProps & DispatchProps & OwnProps;

const Popup = (props: PopupProps) => {
  const { customClassName, close, activeClassName, children, wrapperClassName } = props;
  // mapStateToProps
  const lg = useSelector((state: StoreState) => state.content.lg);
  // Allow to dispatch actions
  const dispatch = useDispatch();

  return (
    <div className={styles('popup', activeClassName)}>
      <div className={styles('overlay')} onClick={close} />
      <div className={styles('wrapper', wrapperClassName)}>{children}</div>
    </div>
  );
};

export default Popup;
