import React from 'react'
import PropTypes from 'prop-types'

import { formatTime } from '../../utils'

import './styles.css'

const Documents = ({ documentSummary }) => {
  if (!(documentSummary && documentSummary.summary)) {
    return null
  }
  return (
    <div className="Documents">
      <div className="Documents-items">
        <div className="Documents-item" key={document.id}>
          <p className="Documents-statsText">{documentSummary.summary.bills.presenter.count}</p>
          <h1 className="Documents-statsHeading">
            Frumvörp sem 1. flutningsmaður
          </h1>
        </div>
        <div className="Documents-item" key={document.id}>
          <p className="Documents-statsText">{documentSummary.summary.bills.coPresenter.count}</p>
          <h1 className="Documents-statsHeading">
            Frumvörp sem meðflutningsmaður
          </h1>
        </div>
      </div>

      <div className="Documents-items">
        <div className="Documents-item" key={document.id}>
          <p className="Documents-statsText">{documentSummary.summary.motions.presenter.count}</p>
          <h1 className="Documents-statsHeading">
            Þingsályktunartillögur sem 1. flutningsmaður
          </h1>
        </div>
        <div className="Documents-item" key={document.id}>
          <p className="Documents-statsText">{documentSummary.summary.motions.coPresenter.count}</p>
          <h1 className="Documents-statsHeading">
            Þingsályktunartillögur sem meðflutningsmaður
          </h1>
        </div>
      </div>

      <div className="Documents-items">
        <div className="Documents-item" key={document.id}>
          <p className="Documents-statsText">{documentSummary.summary.inquiries.asked}</p>
          <h1 className="Documents-statsHeading">
            Fyrirspurnir
          </h1>
        </div>
        <div className="Documents-item" key={document.id}>
          <p className="Documents-statsText">{documentSummary.summary.inquiries.answered}</p>
          <h1 className="Documents-statsHeading">
            Fyrirspurnum svarað
          </h1>
        </div>
      </div>
    </div>
  )
}

Documents.propTypes = {

}

export default Documents

@@ -279,24 +279,57 @@
 Documents%22%3E%0A
+      %3Ch2%3E1. flutningsma%C3%B0ur%3C/h2%3E%0A
       %3Cdiv c
@@ -582,38 +582,16 @@
 Frumv%C3%B6rp
- sem 1. flutningsma%C3%B0ur
 %0A       
@@ -747,17 +747,17 @@
 ary.
-bills.coP
+motions.p
 rese
@@ -838,36 +838,28 @@
     
-Frumv%C3%B6rp sem me%C3%B0flutningsma%C3%B0
+%C3%9Eings%C3%A1lyktunartill%C3%B6g
 ur%0A 
@@ -894,32 +894,65 @@
 %3E%0A      %3C/div%3E%0A%0A
+      %3Ch2%3EMe%C3%B0flutningsma%C3%B0ur%3C/h2%3E%0A
       %3Cdiv class
@@ -1104,33 +1104,35 @@
 summary.motions.
-p
+coP
 resenter.count%7D%3C
@@ -1201,52 +1201,16 @@
     
-%C3%9Eings%C3%A1lyktunartill%C3%B6gur sem 1. flutningsma%C3%B0ur
+Frumv%C3%B6rp
 %0A   
@@ -1485,30 +1485,8 @@
 %C3%B6gur
- sem me%C3%B0flutningsma%C3%B0ur
 %0A   
@@ -1523,24 +1523,52 @@
     %3C/div%3E%0A%0A
+      %3Ch2%3EFyrirspurnir%3C/h2%3E%0A
       %3Cdiv c
@@ -1807,27 +1807,25 @@
         
-Fyrirs
+S
 purni
+nga
 r%0A      
@@ -2068,27 +2068,12 @@
     
-Fyrirspurnum svara%C3%B0
+Sv%C3%B6r
 %0A   

Refactor documents and add headings