import {ExComponent} from '../ExComponent.js'
import {Attribute, Component, Element} from '../decorators.js'
@Component('ex-submit')
export class SubmitButtonComponent extends ExComponent {
protected static styles = `
`
protected static html = `
`
@Attribute()
public label = 'Submit'
@Element('button[type=submit]')
protected buttonEl!: HTMLButtonElement
mount() {
super.mount()
this.buttonEl.addEventListener('click', () => {
this.dispatchCustom('onSubmit', {})
})
}
render() {
super.render()
this.buttonEl.innerText = this.label
}
}