| 1 | import { Plugin } from "@html_editor/plugin"; |
| 2 | import { registry } from "@web/core/registry"; |
| 3 | import { _t } from "@web/core/l10n/translation"; |
| 4 | import { BaseOptionComponent } from "@html_builder/core/utils"; |
| 5 | |
| 6 | export class CouponOption extends BaseOptionComponent { |
| 7 | static template = "website_sale_loyalty.couponOption"; |
| 8 | static selector = "main:has(.oe_website_sale .wizard)"; |
| 9 | static title = _t("Coupon Snippet Options"); |
| 10 | static groups = ["website.group_website_designer"]; |
| 11 | static editableOnly = false; |
| 12 | } |
| 13 | |
| 14 | class CouponOptionPlugin extends Plugin { |
| 15 | static id = "couponOption"; |
| 16 | resources = { |
| 17 | builder_options: [CouponOption], |
| 18 | }; |
| 19 | } |
| 20 | |
| 21 | registry.category("website-plugins").add(CouponOptionPlugin.id, CouponOptionPlugin); |