import { g as getContext, b as attr, h as ensure_array_like, f as store_get, e as escape_html, u as unsubscribe_stores, p as pop, a as push } from "../../../../../../chunks/index.js";
function _page($$payload, $$props) {
  push();
  var $$store_subs;
  const s = getContext("simulation");
  const b = s.banque;
  let annuel = true;
  const banque = b.resultat;
  $$payload.out.push(`<div class="p-10" style="min-height: calc(100vh - 180px);"><h1 class="my-8 text-4xl font-bold">Tous <span class="text-primary">les recoins</span> de votre emprunt.</h1> <div class="flex gap-1 mt-10"><input class="checkbox checkbox-sm checkbox-primary" type="checkbox" role="switch" id="annuel"${attr("checked", annuel, true)}/> <label class="form-check-label" for="annuel">Présentation annuelle</label></div> `);
  {
    $$payload.out.push("<!--[-->");
    const each_array = ensure_array_like(store_get($$store_subs ??= {}, "$banque", banque).remboursementAnnuel);
    $$payload.out.push(`<div class="my-3"><table class="table table-zebra inline-block banque w-auto svelte-17010ws"><thead><tr><th class="svelte-17010ws">Année</th><th class="svelte-17010ws">Capital restant dû</th><th class="svelte-17010ws">Principal</th><th class="svelte-17010ws">Intérêts</th></tr></thead><tbody><!--[-->`);
    for (let periode = 0, $$length = each_array.length; periode < $$length; periode++) {
      let r = each_array[periode];
      $$payload.out.push(`<tr><td class="svelte-17010ws">${escape_html(periode)}</td><td class="svelte-17010ws">${escape_html(store_get($$store_subs ??= {}, "$banque", banque).crdAnnuel[periode].toFixed(0))}</td><td class="svelte-17010ws">${escape_html(r.toFixed(0))}</td><td class="svelte-17010ws">${escape_html(store_get($$store_subs ??= {}, "$banque", banque).interetsAnnuels[periode].toFixed(0))}</td></tr>`);
    }
    $$payload.out.push(`<!--]--></tbody></table></div>`);
  }
  $$payload.out.push(`<!--]--></div>`);
  if ($$store_subs) unsubscribe_stores($$store_subs);
  pop();
}
export {
  _page as default
};
