2020-07-22 12:06:34 -04:00
|
|
|
import Component from "@ember/component";
|
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
|
|
|
|
|
|
|
const RECURRING = "recurring";
|
|
|
|
|
|
|
|
export default Component.extend({
|
2022-10-03 09:14:32 -04:00
|
|
|
tagName: "",
|
|
|
|
|
2020-07-22 12:06:34 -04:00
|
|
|
@discourseComputed("selectedPlan")
|
2022-09-14 18:32:22 -04:00
|
|
|
selectedClass(planId) {
|
|
|
|
return planId === this.plan.id ? "btn-primary" : "";
|
2020-07-22 12:06:34 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
@discourseComputed("plan.type")
|
|
|
|
recurringPlan(type) {
|
|
|
|
return type === RECURRING;
|
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
planClick() {
|
|
|
|
this.clickPlan(this.plan);
|
|
|
|
return false;
|
2020-09-16 10:53:50 -04:00
|
|
|
},
|
|
|
|
},
|
2020-07-22 12:06:34 -04:00
|
|
|
});
|