/*! zaz-comp-switch - v1.0.1 - 11/03/2019 -- 6:25pm */
zaz.use(function(pkg){"use strict";pkg.require(["dictFactory"],function(dicFactory){dicFactory.create({name:"switch",version:"1.0.0",state:"ok","extends":[],langs:{global:{termWithPlural:["plural","singular"]},pt:{term:"Termo em Português"},es:{term:"Termo in Español"},en:{term:"Term in English"},"es-AR":{term:"Termo en Argentina"}}})})}),zaz.use(function compSwitch(pkg){"use strict";var console=pkg.console,require=pkg.require,define=pkg.define,STATIC={};pkg.require(["compFactory"],function(compFactory){compFactory.create({name:"switch",version:"0.0.0",dictionaries:["switch"],templates:{demo:"
"},expects:{properties:{state:{type:"string",required:!0,"enum":["on","off","disabled"]},name:{type:"string",required:!0},size:{type:"string",required:!1}}},init:function(data){var el=this.templates.render("demo",data),state=data.state,size=data.size,API=data;return el.firstChild.addEventListener("click",function(event){var cl=this.getClassList();return cl.contains("is-disabled")?!1:("on"==state?(state="off",cl.remove("is-on"),cl.add("is-off")):(state="on",cl.remove("is-off"),cl.add("is-on")),this.setAttribute("title",state),this.setAttribute("value",state),void API.set("state",state))}),pkg.utils.make.observable(API,{recursive:!1}),{DOM:el,API:API}}})})});