] = "graphicalSelection-part-selection";

        ICONS["add-point"] = "point";
        ICONS["add-plane"] = "plane";
        ICONS["add-capping-surfaces"] = "capping-surface";
        ICONS["add-box"] = "box";

        function toolbarItemViewModel(model) {
            var toolbarItem = {},
                props = {
                    id: { value: model.id },
                    isVisible: { value: ko.observable(model.isVisible) },
                    isEnabled: { value: ko.observable(model.isEnabled) },
                    isPressed: { value: ko.observable(model.isPressed) },
                    tooltip: { value: ko.observable(model.tooltip) },
                    icon: { value: ko.observable(model.icon) },
                    callbackMethod: { value: model.callbackMethod },
                    callbackData: { value: model.callbackData },
                    getIcon: {
                        value: function () {
                            var icon = ICONS[toolbarItem.icon()],
                                iconPath = "url('resources/images/graphics window/toolbar/";

                            iconPath += icon + "-default";

                            iconPath += ".png')";
                            return iconPath;
                        }
                    },
                    itemClick: {
                        value: function (viewModel, event) {
                            if (viewModel.isVisible() && viewModel.isEnabled()) {
                                // Send the notification to perform this action
                                proxy.notify(viewModel.callbackMethod, viewModel.callbackData);
                            }
                        }
                    },
                    update: {
                        value: function (data) {
                            Object.keys(data).forEach(function (key) {
                                if (toolbarItem.hasOwnProperty(key)) {
                                    if (ko.isObservable(toolbarItem[key])) {
                                        toolbarItem[key](data[key]);
                                    } else {
                                        toolbarItem[key] = data[key];
                                    }
                                }
                            });
                        }
                    }
                };

            Object.defineProperties(toolbarItem, props);
            Object.freeze(toolbarItem);
            return toolbarItem;
        }

        function getInstance(model) {
            var toolbarItemVM = toolbarItemViewModel(model);
            Object.create(toolbarItemVM);
            return toolbarItemVM;
        }

        return getInstance;
    }
);