// Autogenerated by Kumi Codegen for schema KUMI_1cc0f48da11964219b3ee59e40d4ccd1845241d449b13954870f7144ae024be3
export class KumiCompiledModule {
  _items_subtotal(input) {
    let out = [];
    let t1 = input["items"];
    t1.forEach((items_el_2, items_i_3) => {
      let t4 = items_el_2.price;
      let t5 = items_el_2.qty;
      let t6 = t4 * t5;
      out.push(t6);
    });
    return out;
  }

  _items_discounted(input) {
    let out = [];
    let t7 = input["items"];
    const t11 = 1.0;
    let t12 = input["discount"];
    let t13 = t11 - t12;
    t7.forEach((items_el_8, items_i_9) => {
      let t10 = items_el_8.price;
      let t14 = t10 * t13;
      out.push(t14);
    });
    return out;
  }

  _items_is_big(input) {
    let out = [];
    let t15 = input["items"];
    const t19 = 100.0;
    t15.forEach((items_el_16, items_i_17) => {
      let t18 = items_el_16.price;
      let t20 = t18 > t19;
      out.push(t20);
    });
    return out;
  }

  _items_effective(input) {
    let out = [];
    let t21 = input["items"];
    const t50 = 100.0;
    const t26 = 0.9;
    t21.forEach((items_el_22, items_i_23) => {
      let t49 = items_el_22.price;
      let t54 = items_el_22.qty;
      let t51 = t49 > t50;
      let t55 = t49 * t54;
      let t27 = t55 * t26;
      let t29 = t51 ? t27 : t55;
      out.push(t29);
    });
    return out;
  }

  _total_qty(input) {
    let acc_30 = 0.0;
    let t31 = input["items"];
    t31.forEach((items_el_32, items_i_33) => {
      let t34 = items_el_32.qty;
      acc_30 += t34;
    });
    return acc_30;
  }

  _cart_total(input) {
    let acc_36 = 0.0;
    let t37 = input["items"];
    t37.forEach((items_el_38, items_i_39) => {
      let t57 = items_el_38.price;
      let t58 = items_el_38.qty;
      let t59 = t57 * t58;
      acc_36 += t59;
    });
    return acc_36;
  }

  _cart_total_effective(input) {
    let acc_42 = 0.0;
    let t43 = input["items"];
    const t69 = 100.0;
    const t63 = 0.9;
    t43.forEach((items_el_44, items_i_45) => {
      let t68 = items_el_44.price;
      let t73 = items_el_44.qty;
      let t70 = t68 > t69;
      let t74 = t68 * t73;
      let t64 = t74 * t63;
      let t66 = t70 ? t64 : t74;
      acc_42 += t66;
    });
    return acc_42;
  }

}
