import wx

from clarabot_nano.resource import get_resource_path

BUNDLE = None


def get_wx_nano_icon(size=None):
    global BUNDLE
    if BUNDLE is None:
        BUNDLE = wx.IconBundle(str(get_resource_path("image", "clarabot_nano.ico")))
    if size:
        return BUNDLE.GetIcon(size)
    return BUNDLE.GetIcon()
