import { toJS } from 'mobx';
import {
  model,
  Model,
  ModelAutoTypeCheckingMode,
  setGlobalConfig,
  tProp,
  types,
} from 'mobx-keystone';

setGlobalConfig({
  modelAutoTypeChecking: ModelAutoTypeCheckingMode.AlwaysOn,
});

@model('keystone/Remote/Acs01/Printer')
export default class Printer extends Model({
  address: tProp(types.string),
  condition_input: tProp(types.string),
  connection_type: tProp(types.number),
  delay_between_prints: tProp(types.number),
  driver: tProp(types.number),
  fallback_device: tProp(types.string),
  fault: tProp(types.boolean),
  id: tProp(types.string),
  moduleid: tProp(types.string),
  name: tProp(types.string),
  one_ticket_per_condition: tProp(types.boolean),
  paper_low: tProp(types.boolean),
  passage: tProp(types.string),
  print_input: tProp(types.string),
  retract_time: tProp(types.number),
  template: tProp(types.string),
  zone: tProp(types.string),
}) {
  get self() {
    return toJS(this);
  }
}
