# Path: conjureup/app_config.py
# class AppConfig:
#     def __setattr__(self, name, value):
#     def _internal_state_key(self):
#     def all_steps(self):
#     def has_bundle_modifications(self):
#     async def save(self):
#     async def restore(self):
# 
# 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')


from theblues.errors import EntityNotFound
from urwid import Columns, Text
from conjureup.app_config import app
from conjureup.ui.views.base import BaseView
from conjureup.ui.widgets.base import ContainerWidgetWrap
from conjureup.ui.widgets.buttons import SecondaryButton
        num_str = "{}".format(self.application.num_units)
        col_pad = 6
        self.unit_w = Text('', align='right')
        self.update_units()
        cws = [
            (maxlen + col_pad, Text(self.application.name)),
            (10 + len(num_str), self.unit_w),
            ('weight', 1, Text(" ")),  # placeholder for instance type
            (20, SecondaryButton("Configure", self._cb('config'))),
        ]

        self.columns = Columns(cws, dividechars=1)
        return self.columns

    def _cb(self, cb_name):
        return lambda _: self._callbacks[cb_name](self.application)

    def remove_buttons(self):
        self._selectable = False
        self.columns.contents = self.columns.contents[:-3]


class ApplicationListView(BaseView):
    title = "Configure Applications"
    subtitle = ""  # set by __init__
    footer = ""  # set by after_keypress
    footer_align = "left"

    def __init__(self, applications, config_cb, finish_cb, back_cb):
        self.subtitle = "{} Applications in {}:".format(len(applications),

# Path: conjureup/app_config.py
# class AppConfig:
#     def __setattr__(self, name, value):
#     def _internal_state_key(self):
#     def all_steps(self):
#     def has_bundle_modifications(self):
#     async def save(self):
#     async def restore(self):
# 
# 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/views/applicationlist.py
from theblues.errors import EntityNotFound
from urwid import Columns, Text
from conjureup.app_config import app
from conjureup.ui.views.base import BaseView
from conjureup.ui.widgets.base import ContainerWidgetWrap
from conjureup.ui.widgets.buttons import SecondaryButton

        num_str = "{}".format(self.application.num_units)
        col_pad = 6
        self.unit_w = Text('', align='right')
        self.update_units()
        cws = [
            (maxlen + col_pad, Text(self.application.name)),
            (10 + len(num_str), self.unit_w),
            ('weight', 1, Text(" ")),  # placeholder for instance type
            (20, SecondaryButton("Configure", self._cb('config'))),
        ]

        self.columns = Columns(cws, dividechars=1)
        return self.columns

    def _cb(self, cb_name):
        return lambda _: self._callbacks[cb_name](self.application)

    def remove_buttons(self):
        self._selectable = False
        self.columns.contents = self.columns.contents[:-3]


class ApplicationListView(BaseView):
    title = "Configure Applications"
    subtitle = ""  # set by __init__
    footer = ""  # set by after_keypress
    footer_align = "left"

    def __init__(self, applications, config_cb, finish_cb, back_cb):
        self.subtitle = "{} Applications in {}:".format(len(applications),

                                                        app.config['spell'])