import json
from docx import Document
from docx.shared import Inches
from docx.shared import Pt
from docx.shared import Length
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
from docx.enum.text import WD_ALIGN_PARAGRAPH

def make_requests_for_production(document, clientPosition, servingParty):
  requestsForProductionArray = [
    "All documents identified, directly or indirectly, in your answers to Interrogatories.", "All written reports of all expert witnesses with whom you or your attorneys have consulted, including, of course, those persons you expect to call as an expert witness at trial.",
    "All documents upon which any expert witness upi intend to call at trial relied upon in formulating an opinion about the subject matter of this action.",
    "The most recent curriculum vitae of each expert whom you expect to call as an expert witness at trial.",
    "All notes, correspondence, bills, invoices, diagrams, photographs, or other documents prepared or reviewed by each person whom you expect to call as an expert witness at trial.",
    "All invoices generated by expert witnesses generated for performing all expert witness services to you, including but not limited to, fees for the medical examination, the records review, the pretrial preparation, any telephone conference, any trial testimony anticipated and any other fee paid for expert fees.",
    "Any and all written, recorded, or signed statements of any party, including the plaintiff, defendant, witnesses, investigators, or agent, representative or employee of the parties concerning the subject matter of this action.",
    "All documents, photographs, videotapes or audio tapes, recordings in any medium, diagnostic images, diagrams, records, surveys or other graphic representations of information concerning the subject matter of this action.",
    "Any documents which afforded, described or pertained to liability insurance coverage for the occurrences which are the subject matter of the complaint.",
    "Any documents identified in any other parties' answers to Interrogatories in your possession, if any.",
    "Any documents received pursuant to a subpoena request in this case.",
    "Any document prepared during the regular course of business as a result of the occurrence complained of in the complaint.",
    "Copies of any treaties, standards in the industry, legal authority, rule, case, statute, or code that will be relied upon in the defense of this case.",
  ]

  p = document.add_paragraph()
  p.add_run("REQUESTS FOR PRODUCTION OF DOCUMENTS").underline = True
  p.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
  arrLen = len(requestsForProductionArray)
  count = 0

  for req in requestsForProductionArray:
    if count == arrLen:
      break

    paragraph = document.add_paragraph(f"{count + 1}. {req}")
    paragraph.paragraph_format.line_spacing = Pt(20)
    paragraph.paragraph_format.space_after = Pt(12)
    paragraph.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
    count = count + 1

  return document