import("graphics", "methods", "stats", "flexmix", "psychotools", "Formula")
importFrom("modeltools", "parameters")
importFrom("lattice", "histogram")
importFrom("lattice", "xyplot", "trellis.par.get", "panel.abline", "panel.xyplot")
importFrom("grDevices", "gray.colors", "hcl")
importFrom("utils", "head")

export(
  ## Bradley-Terry mixture models: interface and driver
  "btmix",
  "FLXMCbtreg",

  ## Rasch mixture models: interface and driver
  "raschmix",
  "FLXMCrasch",

  ## MPT mixture models: interface and driver
  "mptmix",
  "FLXMCmpt",

  ## additional utitilies
  "simRaschmix",
  "scoreProbs",

  ## effects interface
  "effectsplot",
  "effectsplot.efflist",
  "effectsplot.effpoly",
  "allEffects.btmix",
  "allEffects.mptmix",
  "allEffects.raschmix",
  "effect.btmix",
  "effect.mptmix",
  "effect.raschmix"
)

exportClasses("btmix")
exportClasses("raschmix")
exportClasses("mptmix")

exportMethods("effectsplot")
exportMethods("parameters")
exportMethods("plot")
exportMethods("show")
exportMethods("summary")
exportMethods("worth")
exportMethods("itempar")
#exportMethods("refit")

## S3 methods for btmix
S3method("histogram", "btmix")
S3method("labels", "btmix")
S3method("mscale", "btmix")
S3method("xyplot", "btmix")

## S3 methods for raschmix
S3method("histogram", "raschmix")
S3method("xyplot", "raschmix")

## S3 methods for mptmix
S3method("histogram", "mptmix")
S3method("xyplot", "mptmix")

## conditional registration of effects methods
if(getRversion() >= "3.6.0") {
  S3method(effects::allEffects, "btmix")
  S3method(effects::allEffects, "mptmix")
  S3method(effects::allEffects, "raschmix")
  S3method(effects::effect, "btmix")
  S3method(effects::effect, "mptmix")
  S3method(effects::effect, "raschmix")
}
