import { Mediator } from "../../src" ; import { SmileyView } from "../view/SmileyView" ; export class SmileyMediator extends Mediator < SmileyView > { public initialize ( ) { console . log ( "ChildMediator initialized!" ) ; this . view . interactive = true ; this . addViewListener ( "click" , this . onClick , this ) ; } public onClick ( e ) { this . view . parent . removeChild ( this . view ) ; } public destroy ( ) { console . log ( "ChildMediator destroyed!" ) ; } }