# 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
        self._callbacks = {
            'config': config_cb,
        }
        self._selectable = True
        super().__init__(self.build_widgets(maxlen))
        self.columns.focus_position = len(self.columns.contents) - 1

    def __repr__(self):
        return "<ApplicationWidget for {}>".format(
            self.application)

    def selectable(self):
        return self._selectable

    def update_units(self):
        if self.application.is_subordinate:
            num_units = '-'
        else:
            num_units = self.application.num_units
        self.unit_w.set_text("Units: {:>4}".format(num_units))

    def build_widgets(self, maxlen):
        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

# 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

        self._callbacks = {
            'config': config_cb,
        }
        self._selectable = True
        super().__init__(self.build_widgets(maxlen))
        self.columns.focus_position = len(self.columns.contents) - 1

    def __repr__(self):
        return "<ApplicationWidget for {}>".format(
            self.application)

    def selectable(self):
        return self._selectable

    def update_units(self):
        if self.application.is_subordinate:
            num_units = '-'
        else:
            num_units = self.application.num_units
        self.unit_w.set_text("Units: {:>4}".format(num_units))

    def build_widgets(self, maxlen):
        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'))),