module QuantumCliffordOscarExt

using DocStringExtensions

import LinearAlgebra
import LinearAlgebra: rank
import QuantumClifford
import QuantumClifford: Stabilizer
import Nemo
import Nemo: FqFieldElem
import Hecke: group_algebra, GF, abelian_group, gens, quo, one, GroupAlgebra,
   GroupAlgebraElem, direct_product, sub, ZZ, lift, polynomial_ring
import Oscar
import Oscar: free_group, small_group_identification, describe, order, FPGroupElem, FPGroup,
    BasicGAPGroupElem, DirectProductGroup, cyclic_group, free_module, hom, tensor_product,
    chain_complex, total_complex, map, summands, MatElem, matrix, nrows, ncols, kernel, dim, image,
    base_ring, ComplexOfMorphisms, coefficients, zero_matrix, circshift,
    kronecker_product, FqMatrix, identity_matrix, FqPolyRingElem, laurent_polynomial_ring,
    hnf_with_transform, ideal, is_coprime, quo, groebner_basis, length, FqMPolyRingElem,
    first, MPolyQuoRingElem, FqMPolyRingElem, modulus, ideal, monomials, terms, coeff, degree, mod,
    monomial, exponent_vector, nvars, koszul_matrix, koszul_complex, IdealGens, LaurentMPolyWrap
import Oscar.Generic: MatSpaceElem, DirectSumModule, exponent_vectors
import Combinatorics: combinations

import QuantumClifford.ECC: two_block_group_algebra_code, twobga_from_direct_product, twobga_from_fp_group,
    boundary_maps, max_xy_exponents

import QECCore: AbstractECC, CSS, RepCode, AbstractCSSCode,
    hgp, code_k, code_n, code_s, distance, parity_matrix_x, parity_matrix_z, parity_matrix_xz, parity_matrix,
    metacheck_matrix_x, metacheck_matrix_z, metacheck_matrix, hasmetachecks

# exported from extension so that Documenter.jl sees them when autogenerating API lists
export twobga_from_direct_product, twobga_from_fp_group, DDimensionalSurface, DDimensionalToric, boundary_maps,
    HomologicalProduct, DoubleHomologicalProduct, GeneralizedToric, TrivariateTricycle, BivariateBicycleViaPoly, MultivariateMulticycle

include("types.jl")
include("direct_product.jl")
include("bivariate_bicycle.jl")
include("generalized_toric.jl")
include("group_presentation.jl")
include("d_dimensional_codes.jl")
include("trivariate_tricycle.jl")
include("multivariate_multicycle.jl")
include("homological_product_codes.jl")

end # module
