/** @odoo-module **/ import { Component, xml } from "@odoo/owl"; const NO_OP = () => {}; export class Switch extends Component { static props = { value: Boolean, extraClasses: String, disabled: { type: Boolean, optional: true }, label: { type: String, optional: true }, onChange: { Function, optional: true }, }; static defaultProps = { onChange: NO_OP, }; static template = xml` `; setup() { this.extraClasses = this.props.extraClasses ? ` ${this.props.extraClasses}` : ''; } }