'use strict';

var index = require('./index-p7cvUYAE.js');
var checkout_store = require('./checkout.store-CZHrIuaP.js');
require('./index-W-zoNiyM.js');
require('./index-CajjbB9t.js');

const SaveNewPaymentMethod = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.checkboxChanged = index.createEvent(this, "checkboxChanged", 7);
        this.label = 'Save New Payment Method';
        this.isChecked = false;
        this.handleCheckboxChange = (_name, value) => {
            this.isChecked = value;
            checkout_store.checkoutStore.savePaymentMethod = value;
            this.checkboxChanged.emit(this.isChecked);
        };
    }
    render() {
        return (index.h(index.Host, { key: 'a5ecfa60f9f55bdb91343394c1dd5bea542c20ed', hidden: this.hidden }, index.h("form-control-checkbox", { key: '282476dea11415eeec68336577ff17a5c03baad2', label: this.label || 'Save New Payment Method', name: "saveNewPaymentMethod", checked: this.isChecked, inputHandler: this.handleCheckboxChange })));
    }
};

exports.save_new_payment_method = SaveNewPaymentMethod;
