export class DialogBuilder { createButton ( document , label , callback , isPrimary = false ) { const element = document . createElement ( 'button' ) ; element . className = 'btn ' + ( isPrimary ? ' primary' : '' ) ; element . innerText = label ; element . addEventListener ( 'click' , ( ) => callback ( ) ) ; return element ; } }