import type * as Insurance from 'Components/Calculation/Form/Insurance/InsuranceTable/types';
import type InsuranceTable from '.';

export default function extend(insuranceTable: InsuranceTable) {
  return {
    setRowValues(row: Insurance.RowValues) {
      (Object.keys(row) as Insurance.Values[]).forEach((valueName) => {
        insuranceTable.row(row.key).setValue(valueName, row[valueName]);
      });
    },
  };
}
