# Path: sen/tui/widgets/util.py
# class SelectableText(ColorTextMixin, AdHocAttrMap):
#     def __init__(self, text, maps=None):
#         maps = maps or get_map()
#         super().__init__(urwid.Text(text, align="left", wrap="clip"), maps)
# 
# def get_map(defult="main_list_dg"):
#     return {"normal": defult, "focus": MAIN_LIST_FOCUS}


import logging
from sen.tui.widgets.util import SelectableText, get_map
    row = []
    container_id = SelectableText(docker_container.short_id)
    row.append(container_id)

    commands = docker_container.command.split("\n")
    command_str = commands[0]
    if len(commands) > 0:
        command_str += "..."
    command = SelectableText(command_str, get_map(defult="main_list_ddg"))
    row.append(command)

    image = SelectableText(docker_container.image_name())
    row.append(image)

    row.append(ContainerStatusWidget(docker_container))

    name = SelectableText(docker_container.short_name)
    row.append(name)

    return row


def get_container_status_markup(docker_container, nice_status=True):
    if docker_container.running:
        attr_map = get_map("main_list_green")
    elif docker_container.status_created:
        attr_map = get_map("main_list_yellow")
    elif docker_container.exited_well:
        attr_map = get_map("main_list_orange")
    else:

# Path: sen/tui/widgets/util.py
# class SelectableText(ColorTextMixin, AdHocAttrMap):
#     def __init__(self, text, maps=None):
#         maps = maps or get_map()
#         super().__init__(urwid.Text(text, align="left", wrap="clip"), maps)
# 
# def get_map(defult="main_list_dg"):
#     return {"normal": defult, "focus": MAIN_LIST_FOCUS}


# Path: sen/tui/chunks/container.py
import logging
from sen.tui.widgets.util import SelectableText, get_map

    row = []
    container_id = SelectableText(docker_container.short_id)
    row.append(container_id)

    commands = docker_container.command.split("\n")
    command_str = commands[0]
    if len(commands) > 0:
        command_str += "..."
    command = SelectableText(command_str, get_map(defult="main_list_ddg"))
    row.append(command)

    image = SelectableText(docker_container.image_name())
    row.append(image)

    row.append(ContainerStatusWidget(docker_container))

    name = SelectableText(docker_container.short_name)
    row.append(name)

    return row


def get_container_status_markup(docker_container, nice_status=True):
    if docker_container.running:
        attr_map = get_map("main_list_green")
    elif docker_container.status_created:
        attr_map = get_map("main_list_yellow")
    elif docker_container.exited_well:
        attr_map = get_map("main_list_orange")
    else:

        attr_map = get_map("main_list_red")