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