public Item getSelectedItem() {
		if (!opened()) {
			return nil();
		}

		if (indexSelectedItem > -1) {
			Component component = ctx.widgets.component(WIDGET_MAIN, indexSelectedItem);
			return component.valid() ? new Item(ctx, component) : nil();
		}

		for (Component component : ctx.widgets.widget(WIDGET_MAIN).components()) {
			if (component.itemId() > -1) {
				indexSelectedItem = component.index();
				return component.valid() ? new Item(ctx, component) : nil();
			}
		}

		return nil();
	}