import { createCrudHandler } from '~/handlers/_handler'
import { create, update, remove } from '~/services/medicine-group.service'

export const {
  recId,
  recAction,
  recItem,
  isReadonly,
  isProcessing,
  isFormEntryDialogOpen,
  isRecordConfirmationOpen,
  onResetState,
  handleActionSave,
  handleActionEdit,
  handleActionRemove,
  handleCancelForm,
} = createCrudHandler({
  post: create,
  patch: update,
  remove: remove,
})
