class Pdf::Nursing::ExemptService < Pdf::NewApplicationService
  def initialize(school, students)
    @students = students.decorate
    @school = school
  end

  private
    def header
      content = ActionController::Base.new.render_to_string(
        partial: 'pdf/headers/school_info.html.haml',
        locals: {
          school: @school,
          side_content_partial: 'pdf/nursing/exempt_header.html.haml',
          side_content: { date: Time.zone.today }
        }
      )
      { content: content, spacing: 25 }
    end

    def body
      ActionController::Base.new.render_to_string(
        partial: 'pdf/nursing/exempt.html.haml',
        locals: { students: @students, grade_labels: @school.grades_hash }
      )
    end
end
