import downloadIcon from '../assets/dnldpng.png'

function Downloads() {
  const hecManuals = [
    { id: 1, name: 'HEC Self Assessment Manual', file: 'Downloads/HEC Manual for QEC Forms/HEC Self Assessment Manual-1.pdf' },
    { id: 2, name: 'HEC Quality Assurance Manual for Higher Education in Pakistan', file: 'Downloads/HEC Manual for QEC Forms/Quality_Assurance_Manual HEC-2.pdf' },
    { id: 3, name: 'HEC Performance Evaluation Standards For The HEIs', file: 'Downloads/HEC Manual for QEC Forms/Performance Evaluation Standards for_HEIs-3.pdf' },
    { id: 4, name: 'Plagiarism Policy', file: 'Downloads/HEC Manual for QEC Forms/Plagiarism_Policy 4.pdf' },
    { id: 5, name: 'Turn It In Policy', file: 'Downloads/HEC Manual for QEC Forms/Turnitin_Policy 5.pdf' },
    { id: 6, name: 'Standard Operating Procedure', file: 'Downloads/HEC Manual for QEC Forms/Standard Operating Procedure-6.pdf' },
    { id: 7, name: 'HEC MS/M.Phil and PhD Criteria', file: 'Downloads/HEC Manual for QEC Forms/MPHIL-Phd-Criteria-7.pdf' },
    { id: 8, name: 'Policy Regarding Plagiarism Cases', file: 'Downloads/HEC Manual for QEC Forms/POLICY REGARDING PLAGIRISM CASES-8.jpg' },
    { id: 9, name: 'Little Book of Plagiarism', file: 'Downloads/HEC Manual for QEC Forms/Little_Book of Plagiarism-9.pdf' },
    { id: 10, name: 'HEC Faculty Appointment Criteria for Engineering, IT, and Computing Disciplines', file: 'Downloads/HEC Manual for QEC Forms/HEC-Faculty-Appointment-criteria-Engineering-IT-Computing-discplines-10.pdf' },
    { id: 11, name: 'HEC Faculty Appointment Criteria for All Discipline except Engineering & Computer', file: 'Downloads/HEC Manual for QEC Forms/HEC-Faculty-Appointment-criteria-All-Discipline-except-engineering-computer(11).pdf' },
  ]

  const qaForms = [
    { id: 1, name: 'Student Course Evaluation Questionnaire Performa', file: 'Downloads/Proforma 1 Student Course Evaluation Questionnaire.pdf' },
    { id: 2, name: 'Faculty Course Review Report Performa', file: 'Downloads/Proforma 2 Faculty Course Review Report.pdf' },
    { id: 3, name: 'Survey of Graduating Students Performa', file: 'Downloads/Proforma 3 Survey of Graduating Students.pdf' },
    { id: 4, name: 'Research Student Progress Review Form', file: 'Downloads/Proforma 4 Research Student Progress Review Form.pdf' },
    { id: 5, name: 'Faculty Survey Performa', file: 'Downloads/Proforma 5 Faculty Survey.pdf' },
    { id: 6, name: 'Survey of Departments Offering Ph.D Program, Performa', file: 'Downloads/Proforma 6 Survey of Department Offering PhD Program.pdf' },
    { id: 7, name: 'Alumni Survey', file: 'Downloads/Proforma 7 Alumni Survey.pdf' },
    { id: 8, name: 'Employer Survey', file: 'Downloads/Proforma 8 Employer Survey.pdf' },
    { id: 9, name: 'Faculty Resume Form', file: 'Downloads/Proforma 9 Faculty Resume.pdf' },
    { id: 10, name: 'Teacher Evaluation Form', file: 'Downloads/Proforma 10 Teacher Evaluation Form (1).pdf' },
  ]

  const generalDocs = [
    { id: 1, name: 'AIOU Monitory Incentives for Research Publications', file: 'Downloads/AIOU Monitory Incentives.pdf' },
    { id: 2, name: 'Application Form for Plagiarism check and Similarity Index', file: 'Downloads/Application form for Plagiarism check  & Similarity Index_Rev.doc', isNew: true },
    { id: 3, name: 'Check list for MS/M.Phil Student File', file: 'Downloads/MS Phill Student File checklist.doc', isNew: true },
    { id: 4, name: 'Check list for Ph.D Student File', file: 'Downloads/PhD Student File checklist.doc', isNew: true },
  ]

  const DownloadTable = ({ title, items }) => (
    <div className="col-md-offset-3 col-md-6">
      <div className="col-md-12">
        <h3 className="text-center">{title}</h3>
      </div>
      <table className="table table-bordered">
        <thead style={{ backgroundColor: '#0099FF' }}>
          <tr>
            <th style={{ width: '50px' }}>Sr.N</th>
            <th>Description</th>
            <th style={{ width: '40px' }}>Download</th>
          </tr>
        </thead>
        <tbody>
          {items.map((item) => (
            <tr key={item.id}>
              <td>{item.id}</td>
              <td>
                {item.name}
                {item.isNew && <img src="/images/newblink.gif" alt="New" style={{ marginLeft: '5px' }} />}
              </td>
              <td className="text-center">
                <a href={item.file}>
                  <img src={downloadIcon} alt="Download" />
                </a>
              </td>
            </tr>
          ))}
        </tbody>
      </table>
    </div>
  )

  return (
    <div className="container">
      <DownloadTable title="HEC Manual for QEC" items={hecManuals} />
      <hr />
      <DownloadTable title="Quality Assurance Forms" items={qaForms} />
      <hr />
      <DownloadTable title="General QEC Documents" items={generalDocs} />
    </div>
  )
}

export default Downloads
