import React, { useContext } from 'react'
import { CloseButton } from '@siteone/pagebuilder-components'
import Context from '../EventsContext'
import styles from './styles.scss'

const MediaLibraryTop = ({ isVideo = false }) => {
  const ctx = useContext(Context)

  return (
    <div className={styles.base}>
      <span className={styles.title}>{isVideo ? 'Vyberte video' : 'Vyberte obrázek'}</span>
      <div>
        <CloseButton onClick={ctx.handleCancel} />
      </div>
    </div>
  )
}

export default MediaLibraryTop
