2015-08-21 14:39:21 -04:00
|
|
|
import computed from "ember-addons/ember-computed-decorators";
|
|
|
|
|
|
|
|
export default Ember.Component.extend({
|
|
|
|
|
|
|
|
@computed("value")
|
|
|
|
enabled: {
|
|
|
|
get(value) {
|
|
|
|
if (Ember.isEmpty(value)) { return false; }
|
2018-03-04 19:04:23 -05:00
|
|
|
return value.toString() === "true";
|
2015-08-21 14:39:21 -04:00
|
|
|
},
|
|
|
|
set(value) {
|
|
|
|
this.set("value", value ? "true" : "false");
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
});
|