import { UiCanGetVisibleElementMock } from "../xrm-mock/controls/uicangetvisibleelement/uicangetvisibleelement.mock" ; import { UiLabelElementMock } from "../xrm-mock/controls/uilabelelement/uilabelelement.mock" ; import { UiStandardElementMock } from "../xrm-mock/controls/uistandardelement/uistandardelement.mock" ; import * as XrmMock from "../xrm-mock/index" ; import ControlHelpers from "./helpers/control.helper" ; export default class Section { param { string } name param { string } label param { boolean } isVisible param { Xrm . Controls . Tab } parent param { Xrm . Collection . ItemCollection < Xrm . Controls . Control > } controls returns { XrmMock . SectionMock } memberof public createSection ( name ? , label ? , isVisible ? , parent ? , controls ? ) { const section = new XrmMock . SectionMock ( name , parent , new UiStandardElementMock ( new UiLabelElementMock ( label ) , new UiCanGetVisibleElementMock ( isVisible ) ) , controls ) ; if ( controls ) { ControlHelpers . setControlsParent ( controls , section ) ; } return section ; } }