import * as ko from "knockout" ; import "./condition.scss" ; import { SurveyPropertyConditionEditor } from "../propertyEditors/propertyConditionEditor" ; const templateHtml = require ( "./condition.html" ) ; export class PropertyEditorConditionViewModel { constructor ( public koShowExpressionHeader , public onShowHideEditor , public koConditionDisplayText , public koIsEditorShowing , public koIsEditorHidingDisabled , public koShowTabs , public koCanParseExpression , public koActiveView , public onChangeViewClick , public getLocString , public koSetupText , public koIsWideMode , public koEditorItems , public readOnly , public koCanAddItem , public onRemoveConditionClick , public removeConditionText , public addCondition , public addConditionText , public hasAceEditor , public koTextValue , public availableQuestions , public editingObject , public model , public afterRender ) { afterRender ( ) ; } } ko . components . register ( "svd-property-editor-condition" , { viewModel : { createViewModel : ( params , componentInfo ) => { const model = params . model ; return new PropertyEditorConditionViewModel ( model . koShowExpressionHeader , model . onShowHideEditor , model . koConditionDisplayText , model . koIsEditorShowing , model . koIsEditorHidingDisabled , model . koShowTabs , model . koCanParseExpression , model . koActiveView , model . onChangeViewClick , model . getLocString , model . koSetupText , model . koIsWideMode , model . koEditorItems , model . readOnly , model . koCanAddItem , model . onRemoveConditionClick , model . removeConditionText , model . addCondition , model . addConditionText , model . hasAceEditor , model . koTextValue , model . availableQuestions , model . editingObject , model , ( ) => { typeof params . afterRender === "function" && params . afterRender . call ( model , componentInfo ) ; typeof model . koAfterRender === "function" && model . koAfterRender . call ( model , componentInfo ) ; } ) ; } , } , template : templateHtml , } ) ;