
<turbo-stream action="update" target="modal">
  <template>

    <div class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true" x-data="{show: true}" x-show="show">
      <div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"></div>

      <div class="fixed inset-0 z-10 overflow-y-auto">
        <div class="flex justify-center p-4 text-center sm:p-0">
          <div class="relative transform overflow-hidden rounded-lg bg-white p-10 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-md" x-on:click.outside="show = false">
            <button class="absolute top-4 right-4" x-on:click="show = false">
              <svg class="h-5 w-5" fill="currentColor" viewbox="0 0 24 24"><path fill-rule="evenodd" d="M5.47 5.47a.75.75 0 011.06 0L12 10.94l5.47-5.47a.75.75 0 111.06 1.06L13.06 12l5.47 5.47a.75.75 0 11-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 01-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 010-1.06z" clip-rule="evenodd"/></svg>
            </button>
            <div id="apply-form">
              
<div class="flex flex-col" x-data="cv('')">
  <p class="font-bold text-2xl mb-6">Apply to job</p>
  <p>Thanks for your interest in this post. The employer will be sent your contact info, your CV, and any questions or comments about the position you list below.</p>
  <form method="POST" enctype="multipart/form-data" id="applyForm" x-ref="formApply" action="/modals/apply">
    <input type="hidden" :value="Alpine.store('searchCriteria').criteria.activeJobId" data-val="true" data-val-required="The JobId field is required." id="JobId" name="JobId" value="0" />
      <div class="my-4">
        <label class="block text-sm font-medium leading-6 text-gray-900" for="Name">Name<span class="text-red-600"> *</span></label>
        <div class="mt-1">
          <input type="text" id="name" class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 placeholder:text-xs" placeholder="Steve Young" data-val="true" data-val-required="The Name field is required." name="Name" value="">
          <span class="mt-2 text-sm text-red-600 field-validation-valid" data-valmsg-for="Name" data-valmsg-replace="true"></span>

        </div>
      </div>
      <div class="my-4">
        <label class="block text-sm font-medium leading-6 text-gray-900" for="Email">Email<span class="text-red-600"> *</span></label>
        <div class="mt-1">
          <input type="email" id="email" class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 placeholder:text-xs" placeholder="you@example.com" data-val="true" data-val-required="The Email field is required." name="Email" value="">
          <span class="mt-2 text-sm text-red-600 field-validation-valid" data-valmsg-for="Email" data-valmsg-replace="true"></span>

        </div>
      </div>
      <div class="my-4">
        <label class="block text-sm font-medium leading-6 text-gray-900" for="Phone">Phone<span class="text-red-600"> *</span></label>
        <div class="mt-1">
          <input type="text" id="phone" class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 placeholder:text-xs" placeholder="5555555555" data-val="true" data-val-required="The Phone field is required." name="Phone" value="">
          <span class="mt-2 text-sm text-red-600 field-validation-valid" data-valmsg-for="Phone" data-valmsg-replace="true"></span>

        </div>
      </div>
        <div class="my-4">
          <label class="block text-sm font-medium leading-6 text-gray-900" for="Upin">NPI</label>
          <div class="mt-1">
            <input type="text" id="phone" class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 placeholder:text-xs" placeholder="1234567890" name="Upin" value="">
            <span class="mt-2 text-sm text-red-600 field-validation-valid" data-valmsg-for="Upin" data-valmsg-replace="true"></span>
          </div>
          <input type="hidden" data-val="true" data-val-required="The ShowUpin field is required." id="ShowUpin" name="ShowUpin" value="True" />
        </div>

    <div class="my-4">
      <label class="block text-sm font-medium leading-6 text-gray-900" for="Message">Message<span class="text-red-600"> *</span></label>
      <div class="mt-1">
        <textarea rows="4" id="message" class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 placeholder:text-xs" placeholder="Let employer know that you are interested and ask any questions you may have" data-val="true" data-val-required="The Message field is required." name="Message">
</textarea>
        <span class="mt-2 text-sm text-red-600 field-validation-valid" data-valmsg-for="Message" data-valmsg-replace="true"></span>
      </div>
    </div>
    <div>
      <div class="my-4 mb-10">
        <label class="block mb-2 text-sm font-medium text-gray-900" for="CvSpacesObjectId">Upload CV</label>

        <div x-show="hasCv">
          <div class="flex justify-between max-w-sm">
            <p></p>
            <input class="hidden opacity-0 absolute" x-ref="nameCvId" type="number" id="NameCvId" name="NameCvId" value="" /><input name="__Invariant" type="hidden" value="NameCvId" />
            <input class="hidden opacity-0 absolute" x-ref="adUserCvId" type="number" id="AdUserCvId" name="AdUserCvId" value="" /><input name="__Invariant" type="hidden" value="AdUserCvId" />
            <input type="hidden" id="CvContentType" name="CvContentType" value="" />
            <div class="cursor-pointer" x-on:click="removeCv()">
              <svg class="h-6 w-6" fill="none" stroke="currentColor" stroke-width="1.5" viewbox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/></svg>
            </div>
          </div>
          <div class="mt-2">
            <input type="checkbox" autocomplete="off" class="focus:ring-primary-600 h-4 w-4 text-primary-600 border-gray-300 rounded" x-ref="attachCv" data-val="true" data-val-required="The AttachCV field is required." id="AttachCV" name="AttachCV" value="true">
            <label class="" for="AttachCV">
              <span class="text-xs">Attach CV?</span>
            </label>
          </div>
        </div>

        <div x-show="!hasCv">
          <input class="hidden opacity-0 absolute" x-ref="cvFileName" type="text" id="CvActualFileName" name="CvActualFileName" value="" />
          <input class="hidden opacity-0 absolute" type="text" id="CvSpacesObjectId" name="CvSpacesObjectId" value="" />
          <input type="file" class="filepond" name="filepond" id="applyCv">
        </div>

      </div>
        <div class="my-4">
          <input type="checkbox" autocomplete="off" class="focus:ring-primary-600 h-4 w-4 text-primary-600 border-gray-300 rounded" checked data-val="true" data-val-required="The OptIn field is required." id="OptIn" name="OptIn" value="true">
          <label class="" for="OptIn">
            <span class="text-xs"> I’d like to hear about job opportunities that match my ideal criteria. Add me to the private PhysEmp network so the right employers can find me directly.</span>
          </label>
        </div>
        <div class="my-4">
          <p class="font-bold text-xs">By Submitting, you agree to the <a href="https://www.physemp.com/terms-and-conditions" target="_blank" class="text-primary">Terms and Conditions</a></p>
        </div>
      <button id="apply-submit" type="submit" class="mt-4 font-bold w-full bg-gradient-to-r from-red-300 to-red-500 text-white px-2 py-2 rounded-md">Apply</button>
    </div>
  <input name="__RequestVerificationToken" type="hidden" value="CfDJ8Jl1bMnrOYZLpcwn6d8N3pZ_TPH9v3GNz9EJ93LyW5NYbhb81HBcPoudGOAEtgoBqrVjdqkBWNiJmOkg8DRktrp2DnUx8QrtHJ46z3n3XioVSzxJtjxk1xBZc1WkzYq4i1m7w9bSSYR5R5OiFiuO-w0" /><input name="AttachCV" type="hidden" value="false"><input name="OptIn" type="hidden" value="false"></form>
</div>

            </div>
          </div>
        </div>
      </div>
    </div>
  </template>
</turbo-stream>
