# autogenerated file, do not modify
{% import 'macros.jinja' as macros %}
{% set parent = dfn|parent(name) %}
{% set title = (name|title).title() %}
{% set description = name|description %}


from os import PathLike, curdir
from typing import Union

from flopy.mf6.data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator
from flopy.mf6.mfpackage import MFPackage

class Modflow{{ title }}(MFPackage):
    """
    {{ description }}

    Parameters
    ----------
    simulation : MFSimulation
        Simulation that this package is a part of. Package is automatically
        added to simulation when it is initialized.
    loading_package : bool, default False
        Do not set this parameter. It is intended for debugging and internal
        processing purposes only.
    exgtype : str, default "{{ name[1][:3].upper() }}6-{{ name[1][3:].upper() }}6"
        The exchange type (GWF-GWF or GWF-GWT).
    exgmnamea : str, optional
        The name of the first model that is part of this exchange.
    exgmnameb : str, optional
        The name of the second model that is part of this exchange.
{{ macros.docstrings(dfn|variables)|indent(4, first=true) }}
    filename : str or PathLike, optional
        Name or path of file where this package is stored.
    pname : str, optional
        Package name.
    **kwargs
        Extra keywords for :class:`flopy.mf6.mfpackage.MFPackage`.

    """

    {% for attr in dfn|attrs(name) %}
    {{ attr }}
    {% endfor %}

    def __init__(
        self,
        simulation,
        loading_package=False,
        exgtype="{{ name[1][:3].upper() }}6-{{ name[1][3:].upper() }}6",
        exgmnamea=None,
        exgmnameb=None,
{{ macros.init_params(dfn|variables, skip=name|skip_init)|indent(8, first=true) }}
        filename=None,
        pname=None,
        **kwargs,
    ):
        """Initialize Modflow{{ title }}."""
        super().__init__(
            parent={{ parent }},
            package_type="{{ name[1] }}",
            filename=filename,
            pname=pname,
            loading_package=loading_package,
            **kwargs,
        )

        self.exgtype = exgtype
        self.exgmnamea = exgmnamea
        self.exgmnameb = exgmnameb
        simulation.register_exchange_file(self)

        {% for statement in dfn|init(name) %}
        {{ statement }}
        {% endfor %}

        self._init_complete = True
