importFrom("methods",
           "is", "new", "slot", "slotNames", "callNextMethod", "getMethod")

importFrom("utils",
           # "sessionInfo",
           "packageDescription", "str", "write.table", "packageVersion",
           "capture.output", "head", "tail", "getFromNamespace", "compareVersion")

importFrom("stats",
           "approx", "density", "median",
           "dbinom", "dnorm", "pnorm", "rgamma", "rnorm",
           "runif", "sd", "quantile", "rWishart", "cov", "cor",
           "coef", "logLik",
           "residuals", "resid",
           "fitted.values", "fitted", "na.omit",
           "predict",
           "update",
           "anova",
           "vcov", "nobs", "cov2cor")

importFrom("graphics",
           "plot", "hist", "pairs", "legend", "par", "plot.new",
           "polygon")

importFrom("grDevices",
           "adjustcolor")

importFrom("lavaan",
           "lavaan", "logLik",
           "fitMeasures", "fitmeasures",
           "inspect", "lavInspect", "lavTech", "lavNames",
           "lavParseModelString", "lavMatrixRepresentation",
           "lav_func_jacobian_complex", "lav_func_jacobian_simple",
           "lav_partable_labels", "lavaanify",
           "lav_model_get_parameters", "lav_model_implied",
           "lav_model_set_parameters", "lav_model_vcov_se",
           "lav_partable_attributes",
           "modificationIndices", "parTable", "parameterEstimates",
           "lavPredict", "standardizedSolution", "lav_data_update",
           "lav_samplestats_from_data")

importFrom("coda",
           "mcmc.list",
           "mcmc", "as.mcmc",
           "HPDinterval")

importFrom("mnormt",
           "dmnorm",
           "rmnorm",
           "sadmvn")

importFrom("nonnest2",
           "llcont")

importFrom("rstan",
           "sampling", "stan", "vb")

importFrom("loo",
           "loo", "waic", "loo_compare", "relative_eff")

importFrom("Matrix",
           "Matrix")

importFrom("future.apply",
           "future_lapply", "future_sapply")

importFrom("tmvnsim",
           "tmvnsim")

importFrom("igraph",
           "graph_from_adjacency_matrix", "components")

## need to import something, though others could be used
importFrom("bayesplot",
           "mcmc_trace")
           ## "mcmc_acf", "mcmc_acf_bar", "mcmc_areas",
           ## "mcmc_areas_data", "mcmc_areas_ridges",
           ## "mcmc_areas_ridges_data", "mcmc_combo", "mcmc_dens",
           ## "mcmc_dens_chains", "mcmc_dens_chains_data",
           ## "mcmc_dens_overlay", "mcmc_hex", "mcmc_hist",
           ## "mcmc_hist_by_chain", "mcmc_intervals",
           ## "mcmc_intervals_data", "mcmc_neff", "mcmc_neff_data",
           ## "mcmc_neff_hist", "mcmc_nuts_acceptance",
           ## "mcmc_nuts_divergence", "mcmc_nuts_energy",
           ## "mcmc_nuts_stepsize", "mcmc_nuts_treedepth", "mcmc_pairs",
           ## "mcmc_parcoord", "mcmc_parcoord_data", "mcmc_rank_hist",
           ## "mcmc_rank_overlay", "mcmc_recover_hist",
           ## "mcmc_recover_intervals", "mcmc_recover_scatter",
           ## "mcmc_rhat", "mcmc_rhat_data", "mcmc_rhat_hist",
           ## "mcmc_scatter", "mcmc_trace", "mcmc_trace_data",
           ## "mcmc_trace_highlight", "mcmc_violin")

import(Rcpp)

importFrom("RcppParallel", "CxxFlags", "RcppParallelLibs")

import(rstantools)

export("blavaan", "bcfa", "bsem", "bgrowth", "dpriors", "BF", "blavCompare",
       "blavTech", "blavInspect", "blavFitIndices", "labelfun", "standardizedposterior",
       "standardizedPosterior", "ppmc", "blavPredict", "sampleData")

exportClasses("blavaan", "blavPPMC", "blavFitIndices")

exportMethods("summary", "coef", "show", "predict")

S3method(plot, blavaan)
#S3method(summary, blavaan)
S3method(summary, blavPPMC)
S3method(plot, blavPPMC)
S3method(hist, blavPPMC)
S3method(pairs, blavPPMC)
S3method(summary, blavFitIndices)

useDynLib(blavaan, .registration = TRUE)
