<turbo-stream action="replace" target="modal"><template>
  <turbo-stream action='set_modal_in_url' modal_url='/admin/cherwell/merge_families/185/select_duplicate'></turbo-stream>
  <turbo-frame id='modal'>
    <form data-turbo-frame="_top" action="/admin/cherwell/merge_families/185/select_duplicate" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="put" autocomplete="off" /><input type="hidden" name="authenticity_token" value="7Oj15apo2lEPmfuRQ9k8W1O3a_MXX1u67wsiA7zqXv3AjOPFRfrmJ4eg8hxp8FyDCDS7AakOdc2teD0Sn1_pIw" autocomplete="off" />
      <div class="fixed inset-0 z-30 bg-gray-500/75 transition-opacity" aria-hidden="true"></div>
<div class="fixed inset-0 z-30 overflow-y-auto flex items-center justify-center" >
  <div class="max-h-screen w-full max-w-6xl relative">
    <div class="p-8 m-1 bg-white rounded shadow">
      
        <div class="flex justify-between gap-x-4 items-start">
          <h1 class="flex items-baseline gap-x-3">
            <div class="text-2xl font-bold text-gray-900">
              Merge families
            </div>
          </h1>
          <div class='flex text-gray-500 rounded-full p-1 hover:bg-gray-100'>
            <button name="cancel" type="submit" value="cancel">
              <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 24 24" stroke="currentColor" class="h-5 w-5">
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>

</button>          </div>
        </div>

        <div class="mt-2">
          <div data-controller='better-conditional-fields'>
            

            <div class="pb-8 mb-8 border-b border-gray-200"><div><h3 class="text-md leading-6 font-medium text-gray-900"></h3><p class="mt-1 text-sm text-gray-500"></p></div><div class="mt-6 grid grid-cols-1 gap-y-6 gap-x-4 sm:grid-cols-6">
              <div class="sm:col-span-6">
                <div class="rounded-md p-4 shadow bg-blue-50">
  <div class="flex">
    <div class="flex-shrink-0">
        <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" fill="currentColor" aria-hidden="true" class="h-5 w-5 text-blue-400">
  <path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"></path>
</svg>

    </div>
    <div class="ml-3 flex-1">
      <h3 class="text-sm font-semibold text-blue-800">
        Complete this form if you have identified two records for the same family. Contact support@goodbase.co.uk if you run into problems with this form.      </h3>

    </div>
  </div>
</div>

              </div>
              <div class="sm:col-span-6">
                <div class="rounded-md p-4 shadow bg-yellow-50">
  <div class="flex">
    <div class="flex-shrink-0">
        <svg class="h-5 w-5 text-yellow-400" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" fill="currentColor" aria-hidden="true">
  <path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path>
</svg>

    </div>
    <div class="ml-3 flex-1">
      <h3 class="text-sm font-semibold text-yellow-800">
        The duplicate record will be merged into the main record. All casework and participants on the duplicate record will be copied onto the main record then the duplicate record will no longer be available on the platform.      </h3>

    </div>
  </div>
</div>

              </div>
              <div class='sm:col-span-6 mb-3 mt-4'>
                <input value="185" autocomplete="off" type="hidden" name="select_duplicate_form[main_record_id]" id="select_duplicate_form_main_record_id" />
                <div class='text-sm font-medium text-gray-700 mb-1 underline'>Main record</div>
                <div class="flex items-baseline gap-x-3 flex-wrap">
                  <div class="">
                    <span>Herzog Family</span>
                    <span class="text-base text-gray-600">#185</span>
                      <span class="ml-2 text-base text-gray-600">sheila_hand@example.com</span>
                      <span class="ml-2 text-base text-gray-600">07523 7651928</span>
                  </div>
                  <div class="text-sm text-gray-700">
                    Alaina Herzog,
                    YM-IF2KI
                      <span class="ml-0.5"><span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-indigo-100 text-indigo-800">main</span></span>
                  </div>
                </div>
              </div>

              <div class="sm:col-span-6">
                <div id="family-autocomplete-component-duplicate">
  <input type="hidden" name="select_duplicate_form[duplicate_id]" id="select_duplicate_form_duplicate_id" autocomplete="off" />
  <div id="duplicate__autocomplete" class="relative" data-controller="autocomplete-tag" data-autocomplete-tag-reflex-value="FamilyType::AutocompleteReflex" data-form-scope="select_duplicate_form" data-field-name="duplicate" data-label="Duplicate record (search by main participant&#39;s last name)">
  <label class="flex text-sm font-medium text-gray-700" for="duplicate__query">Duplicate record (search by main participant&#39;s last name)</label>
  <div class="mt-1 relative rounded-md shadow-sm">
    <input data-autocomplete-tag-target="query" data-action="debounced:input->autocomplete-tag#search"  autocomplete="off" name="duplicate__query"  type="text" id="duplicate__query" class="block w-full pr-10 sm:text-sm rounded-md focus:ring-indigo-500 focus:border-indigo-500 border-gray-300" >
    <div class="absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none">
      <span data-autocomplete-tag-target="searchIcon">
        <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" fill="currentColor" aria-hidden="true" class="h-5 w-5 text-gray-400">
  <path fill-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" clip-rule="evenodd"></path>
</svg>
      </span>
      <span data-autocomplete-tag-target="searchingIcon" hidden>
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 24 24" class="h-5 w-5 text-gray-400">
  <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
  <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>

      </span>
    </div>
  </div>
</div></div>

              </div>
</div></div>
            <div><div class="flex flex-col-reverse space-y-4 space-y-reverse sm:justify-end sm:flex-row sm:space-y-0 sm:space-x-3">
              <div class="flex-grow"></div>
              <div><button name="cancel" type="submit" value="cancel" class="py-2 px-4 inline-flex justify-start text-blue-500 hover:text-blue-700 text-sm font-medium underline">Cancel</button></div>
              <div><button name="button" type="submit" data-turbo-submits-with="Please wait..." class="inline-flex justify-center py-2 px-4 border shadow-sm text-sm font-medium rounded-md border-transparent text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">Next</button></div>
</div></div>          </div>
        </div>

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