{% extends 'base.html.twig' %}

{% block body %}
	{{ block('nav', 'internal/libs/nav.html.twig') }}

	<main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg ">
		{{ block('topnav', 'internal/libs/top-nav.html.twig') }}

		<section>

			<div class="card card-plain">
				<div class="card-header">
					<h4 class="font-weight-bolder">Case Info</h4>
					<p class="mb-0"></p>
				</div>
				<div class="card-body">
					<div class="container">
						{{ form_errors(form) }}

						{{ form_start(form) }}
						<div class="row">
							<div class='col'>
								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_caseNumber' class='form-label'>Case #</label>
									<input type='text' name='{{ field_name(form.caseNumber) }}' id='case_form_caseNumber' class='form-control' required='required'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_dcsCaseId' class='form-label'>DCS Case ID</label>
									<input type='text' name='{{ field_name(form.dcsCaseId) }}' id='case_form_dcsCaseId' class='form-control' required='required'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_admitDate'></label>
									<input type='date' name='{{ field_name(form.admitDate) }}' id='case_form_admitDate' class='form-control' title='Admit Date'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_closeDate'></label>
									<input type='date' name='{{ field_name(form.closeDate) }}' id='case_form_closeDate' class='form-control' title='Close Date'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_caseEmail' class='form-label'>Case Email</label>
									<input type='text' name='{{ field_name(form.caseEmail) }}' id='case_form_caseEmail' class='form-control'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_referralType'></label>
									<select name='{{ field_name(form.referralType) }}' id='case_form_referralType' class='form-control' title='Referral Type'>
										<option value=''>-- Referral Type --</option>

										{% for r in enum('App\\Enums\\Case\\ReferralType').cases() %}
											<option value='{{ r.name }}'>{{ r.name }}</option>
										{% endfor %}
									</select>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_level'></label>
									<select name='{{ field_name(form.level) }}' id='case_form_level' class='form-control' title='Case Level'>
										<option value=''>-- Case Level --</option>
										{% for l in enum('App\\Enums\\CaseLevel').cases() %}
											<option value='{{ l.value }}'>{{ l.name|replace({'_': ' '})|lower|capitalize }}</option>
										{% endfor %}
									</select>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_referralSource'></label>
									<select name='{{ field_name(form.referralSource) }}' id='case_form_referralSource' class='form-control'>
										<option value=''>-- Referral Source --</option>

										{% for src in sources %}
											<option value='{{ src.id }}'>{{ src.name}}</option>
										{% endfor %}
									</select>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_referralSources2'></label>
									<select name='{{ field_name(form.referralSource2) }}' id='case_form_referralSources2' class='form-control'>
										<option value=''>-- 2nd Referral Source --</option>

										{% for src in sources %}
											<option value='{{ src.id }}'>{{ src.name }}</option>
										{% endfor %}
									</select>
								</div>
							</div>
							<div class='col'>
								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_firstName' class='form-label'>First Name</label>
									<input type='text' name='{{ field_name(form.firstName) }}' id='case_form_firstName' class='form-control' required='required'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_lastName' class='form-label'>Last Name</label>
									<input type='text' name='{{ field_name(form.lastName) }}' id='case_form_lastName' class='form-control' required='required'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_address' class='form-label'>Address</label>
									<input type='text' name='{{ field_name(form.address) }}' id='case_form_address' class='form-control'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_address2' class='form-label'>Address 2</label>
									<input type='text' name='{{ field_name(form.address2) }}' id='case_form_address2' class='form-control'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_city' class='form-label'>City</label>
									<input type='text' name='{{ field_name(form.city) }}' id='case_form_city' class='form-control'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_state' class='form-label'>State</label>
									<input type='text' name='{{ field_name(form.state) }}' id='case_form_state' class='form-control'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_zip' class='form-label'>Zip</label>
									<input type='text' name='{{ field_name(form.zip) }}' id='case_form_zip' class='form-control'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_county'></label>
									<select name='{{ field_name(form.county) }}' id='case_form_county' class='form-control'>
										<option value=''>-- County --</option>
										{% for c in enum('App\\Enums\\County').cases() %}
											<option value='{{ c.value }}'>{{ c.name|lower|capitalize }}</option>
										{% endfor %}
									</select>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_insurance' class='form-label'>Insurance</label>
									<input type='text' name='{{ field_name(form.insurance) }}' id='case_form_insurance' class='form-control'/>
								</div>

								<div class='input-group input-group-outline mb-3'>
									<label for='case_form_medicaid' class='form-label'>Medicaid</label>
									<input type='text' name='{{ field_name(form.medicaid) }}' id='case_form_medicaid' class='form-control'/>
								</div>
							</div>
						</div>
						<div class='row'>
							<div class="text-center">
								<button type="submit" class="btn btn-lg bg-gradient-dark btn-lg w-100 mt-4 mb-0">Save Case</button>
							</div>
						</div>
						{{ form_end(form) }}
					</div>
				</div>
			</div>
		</section>
	</main>
{% endblock %}

{% block page_css %}
<style type='text/css'>
.check {
	margin: 0 5px;
}
</style>
{% endblock %}