# Path: conjureup/ui/widgets/base.py
# class ContainerWidgetWrap(WidgetWrap, WidgetContainerMixin):
#     """
#     Base for WidgetWraps that wrap containers and want container methods
#     to pass through.
#     """
# 
#     def __init__(self, *args, **kwargs):
#         super().__init__(*args, **kwargs)
# 
#     @property
#     def contents(self):
#         return self._w.contents
# 
#     @property
#     def focus(self):
#         return self._w.focus
# 
#     @property
#     def focus_position(self):
#         return self._w.focus_position
# 
#     @focus_position.setter
#     def focus_position(self, value):
#         self._w.focus_position = value
# 
# Path: conjureup/ui/widgets/buttons.py
# class SecondaryButton(StyledButton):
#     enabled_styles = ('button_secondary', 'button_secondary focus')
#     disabled_styles = ('disabled_button', 'disabled_button focus')


import logging
from enum import Enum
from ubuntui.utils import Color, Padding
from ubuntui.widgets.input import StringEditor
from urwid import (
    CheckBox,
    Columns,
    GridFlow,
    IntEdit,
    Pile,
    Text,
    connect_signal
)
from conjureup.ui.widgets.base import ContainerWidgetWrap
from conjureup.ui.widgets.buttons import SecondaryButton
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.




log = logging.getLogger('conjure')


class OptionType(Enum):
    BOOLEAN = 0
    STRING = 1
    INT = 2
    FLOAT = 3


def strip_solo_dots(s):
    ls = s.split("\n")
    rl = []
    for l in ls:
        if l == ".":
            rl.append("")
        else:
            rl.append(l)
    return "\n".join(rl)



# Path: conjureup/ui/widgets/base.py
# class ContainerWidgetWrap(WidgetWrap, WidgetContainerMixin):
#     """
#     Base for WidgetWraps that wrap containers and want container methods
#     to pass through.
#     """
# 
#     def __init__(self, *args, **kwargs):
#         super().__init__(*args, **kwargs)
# 
#     @property
#     def contents(self):
#         return self._w.contents
# 
#     @property
#     def focus(self):
#         return self._w.focus
# 
#     @property
#     def focus_position(self):
#         return self._w.focus_position
# 
#     @focus_position.setter
#     def focus_position(self, value):
#         self._w.focus_position = value
# 
# Path: conjureup/ui/widgets/buttons.py
# class SecondaryButton(StyledButton):
#     enabled_styles = ('button_secondary', 'button_secondary focus')
#     disabled_styles = ('disabled_button', 'disabled_button focus')


# Path: conjureup/ui/widgets/option_widget.py
import logging
from enum import Enum
from ubuntui.utils import Color, Padding
from ubuntui.widgets.input import StringEditor
from urwid import (
    CheckBox,
    Columns,
    GridFlow,
    IntEdit,
    Pile,
    Text,
    connect_signal
)
from conjureup.ui.widgets.base import ContainerWidgetWrap
from conjureup.ui.widgets.buttons import SecondaryButton

# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.




log = logging.getLogger('conjure')


class OptionType(Enum):
    BOOLEAN = 0
    STRING = 1
    INT = 2
    FLOAT = 3


def strip_solo_dots(s):
    ls = s.split("\n")
    rl = []
    for l in ls:
        if l == ".":
            rl.append("")
        else:
            rl.append(l)
    return "\n".join(rl)



class OptionWidget(ContainerWidgetWrap):