const AcknowledgementCard = require('../model/procedure/acknowledgement-card');
const AttendanceCard = require('../model/procedure/attendance-card');
const Card = require('../model/procedure/card');
const CheckboxCard = require('../model/procedure/checkbox-card');
const ChemicalCard = require('../model/procedure/chemical-card');
const ChemicalBandCard = require('../model/procedure/chemical-band-card');
const ConditionCard = require('../model/procedure/condition-card');
const EquipmentCard = require('../model/procedure/equipment-card');
const InspectCard = require('../model/procedure/inspect-card');
const InventoryCard = require('../model/procedure/inventory-card');
const LocationCard = require('../model/procedure/location-card');
const LotoElectricalCard = require('../model/procedure/loto-electrical-card');
const ValueUnitCard = require('../model/procedure/value-unit-card');
const QuestionCard = require('../model/procedure/question-card');
const ReferenceCard = require('../model/procedure/reference-card');
const SelectCard = require('../model/procedure/select-card');
const TextCard = require('../model/procedure/text-card');
const TableCard = require('../model/procedure/table-card');
const BuaCard = require('../model/procedure/bua-card');
const BiosafetyCard = require('../model/procedure/biosafety-card');
const BuaAttendanceCard = require('../model/procedure/bua-attendance-card');

module.exports.createCardFactory = (type, card) => {
  switch (type) {
    case 'ACKNOWLEDGEMENT':
      return new AcknowledgementCard(card);
    case 'ATTENDANCE':
      return new AttendanceCard(card);
    case 'BIOSAFETY':
      return new BiosafetyCard(card);
    case 'BUA':
      return new BuaCard(card);
    case 'BUA_ATTENDANCE':
      return new BuaAttendanceCard(card);
    case 'CHECKBOX':
      return new CheckboxCard(card);
    case 'CHEMICAL':
      return new ChemicalCard(card);
    case 'CHEMICAL_BAND':
      return new ChemicalBandCard(card);
    case 'CONDITION':
      return new ConditionCard(card);
    case 'EQUIPMENT':
      return new EquipmentCard(card);
    case 'INSPECT':
      return new InspectCard(card);
    case 'INVENTORY':
      return new InventoryCard(card);
    case 'LOCATION':
      return new LocationCard(card);
    case 'LOTO_ELECTRICAL':
      return new LotoElectricalCard(card);
    case 'QUESTION':
      return new QuestionCard(card);
    case 'REFERENCE':
      return new ReferenceCard(card);
    case 'SELECT':
      return new SelectCard(card);
    case 'TEXT':
      return new TextCard(card);
    case 'VALUE_UNIT':
      return new ValueUnitCard(card);
    case 'TABLE':
      return new TableCard(card);

    default:
      return { ...new Card(card), details: {} };
  }
};
