// Handlers
import { genCrudHandler } from '~/handlers/_handler'
import type { DeviceOrder } from '~/models/device-order'

// Services
import { create, update, remove } from '~/services/device-order.service'

export const {
  recId,
  recAction,
  recItem,
  isReadonly,
  isProcessing,
  isFormEntryDialogOpen,
  isRecordConfirmationOpen,
  onResetState,
  handleActionSave,
  handleActionEdit,
  handleActionRemove,
  handleCancelForm,
} = genCrudHandler<DeviceOrder>({
  create,
  update,
  remove,
})
