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) {
|
2018-06-15 11:03:24 -04:00
|
|
|
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;
|
|
|
|
}
|
2018-06-15 11:03:24 -04:00
|
|
|
}
|
2015-08-21 14:39:21 -04:00
|
|
|
});
|