import * as ko from "knockout" ; import { ImplementorBase } from "survey-knockout-ui" ; import { ToolboxToolViewModel } from "@survey/creator" ; import { SurveyCreator } from "../../creator" ; import { IQuestionToolboxItem } from "@survey/creator" ; const template = require ( "./toolbox-tool.html" ) ; export class KnockoutToolboxToolViewModel extends ToolboxToolViewModel { public title : ko . Observable < string > = ko . observable ( "" ) ; public iconName : ko . Observable < string > = ko . observable ( "" ) ; constructor ( protected item , protected creator , public isCompact = true ) { super ( item , creator ) ; } } ko . components . register ( "svc-toolbox-tool" , { viewModel : { createViewModel : ( params , componentInfo ) => { new ImplementorBase ( params . item ) ; return new KnockoutToolboxToolViewModel ( params . item , params . creator , params . isCompact ) ; } } , template : template } ) ;