import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { MatIcon, MatIconModule } from '@angular/material/icon';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "../../../services/rest.service";
export class SchemeSelectionComponent {
    constructor(dialogRef, restService) {
        this.dialogRef = dialogRef;
        this.restService = restService;
    }
    ngOnInit() {
        this.getAllRedemptionSchemes();
    }
    goBack() {
        this.dialogRef.close();
    }
    getAllRedemptionSchemes() {
        this.restService.getAllRedemptionSchemes().subscribe((res) => {
            this.redemptionData = res?.data || [];
        });
    }
    onRadioChange() {
        this.selectedAmount = this.redemptionData?.amount || 0;
    }
    applyRedmption() {
        this.dialogRef.close({ redmpetionData: this.redemptionData, selectedAmount: this.selectedAmount });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SchemeSelectionComponent, deps: [{ token: i1.MatDialogRef }, { token: i2.RestService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SchemeSelectionComponent, isStandalone: true, selector: "simpo-scheme-selection", ngImport: i0, template: "<div class=\"overlay-screen w-100 h-100 d-flex justify-content-center align-items-center\">\n    <div class=\"main_page h-75\">\n        <div class=\"modal-header\">\n            <h2>Select Scheme for Redemption</h2>\n            <div class=\"close-btn cursor-pointer\" (click)=\"goBack()\"><mat-icon>close</mat-icon></div>\n        </div>\n\n        <div class=\"modal-body\">\n            <div class=\"scheme-option\">\n                <label for=\"individual\" class=\"scheme-card\">\n                    <div class=\"scheme-info d-flex gap-1\">\n                        <div class=\"form-check-radio\">\n                            <input class=\"form-check-input-radio\" type=\"radio\" name=\"flexRadioDefault\"\n                                id=\"flexRadioDefault2\" (change)=\"onRadioChange()\">\n                        </div>\n                        <div class=\"\">\n                            <div class=\"scheme-title\">Individual Investment Scheme</div>\n                            <div class=\"scheme-details\">\n                                <span class=\"scheme-id\">GPP Id: {{redemptionData.GPPId}}</span>\n                                <span class=\"scheme-maturity\">Maturity Date: 12 April 2024</span>\n                            </div>\n                            <div class=\"scheme-amount\">\u20B9{{redemptionData.amount}}</div>\n                        </div>\n                    </div>\n                    <div class=\"scheme-monthly\">\u20B98000/M</div>\n                </label>\n            </div>\n        </div>\n        <div class=\"modal-footer gap-3\">\n            <div class=\"redemption-summary gap-2\">\n                <span class=\"redemption-label\">Redemption Amount</span>\n                <span class=\"redemption-value\">\u20B9{{selectedAmount ? selectedAmount : 0}}</span>\n            </div>\n            <div class=\"action-btns d-flex w-100 gap-2\"> <button class=\"cancel-btn\">Cancel</button>\n                <button class=\"apply-btn\" (click)=\"applyRedmption()\">Apply Redemption</button>\n            </div>\n        </div>\n    </div>\n</div>", styles: ["*{font-family:var(--website-font-family)}mat-icon{font-family:Material Icons!important}.main_page{background:#fff;z-index:100!important;padding:3%;box-shadow:#0000001a 0 4px 12px;overflow-y:hidden;width:35vw}.modal-header{display:flex;justify-content:space-between;align-items:center}.modal-header h2{font-size:14px;font-weight:600;color:#111827;margin:0}.close-btn mat-icon{font-size:20px}.modal-body{padding:24px 24px 0;height:46vh;overflow-y:scroll}.scheme-option{margin-bottom:16px}.scheme-option input[type=radio]:checked+.scheme-card{border-color:#06b6d4;background:#f0f9ff;position:relative}.scheme-option input[type=radio]:checked+.scheme-card:before{content:\"\";position:absolute;top:20px;left:20px;width:20px;height:20px;border:2px solid #06b6d4;border-radius:50%;background:#fff}.scheme-option input[type=radio]:checked+.scheme-card:after{content:\"\";position:absolute;top:26px;left:26px;width:8px;height:8px;background:#06b6d4;border-radius:50%}.scheme-card{display:flex;justify-content:space-between;align-items:center;padding:20px;border:2px solid #e5e7eb;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff}.scheme-card:hover{border-color:#d1d5db;background:#f9fafb}.form-check-radio{width:10%}.scheme-title{font-size:12px;font-weight:600;color:#111827;margin-bottom:8px}.scheme-details{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}.scheme-details span{font-size:12px}.scheme-monthly{font-size:14px;font-weight:600;color:#111827;min-width:100px;text-align:right}.modal-footer{display:flex;border-top:1px solid #e5e7eb;padding-top:1%}.redemption-summary{display:flex;justify-content:flex-start;align-items:center;width:100%}.redemption-label{font-size:16px;color:#374151}.redemption-value{font-size:20px;font-weight:700;color:#059669}.cancel-btn,.apply-btn{border:none;border-radius:6px;font-size:12px!important;padding:1%;font-weight:600;cursor:pointer;transition:all .2s ease}.cancel-btn{background:#fff;color:#374151;border:1px solid #d1d5db}.cancel-btn:hover{background:#f9fafb;border-color:#9ca3af}.apply-btn{background:#06b6d4;color:#fff}.apply-btn:hover{background:#0891b2}.redemption-summary span{font-size:12px;font-weight:700}.scheme-id,.scheme-maturity{font-size:14px;color:#6b7280}.scheme-amount{font-size:14px;font-weight:700;color:#06b6d4}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatIconModule }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SchemeSelectionComponent, decorators: [{
            type: Component,
            args: [{ selector: 'simpo-scheme-selection', standalone: true, imports: [CommonModule, MatIcon, MatIconModule], template: "<div class=\"overlay-screen w-100 h-100 d-flex justify-content-center align-items-center\">\n    <div class=\"main_page h-75\">\n        <div class=\"modal-header\">\n            <h2>Select Scheme for Redemption</h2>\n            <div class=\"close-btn cursor-pointer\" (click)=\"goBack()\"><mat-icon>close</mat-icon></div>\n        </div>\n\n        <div class=\"modal-body\">\n            <div class=\"scheme-option\">\n                <label for=\"individual\" class=\"scheme-card\">\n                    <div class=\"scheme-info d-flex gap-1\">\n                        <div class=\"form-check-radio\">\n                            <input class=\"form-check-input-radio\" type=\"radio\" name=\"flexRadioDefault\"\n                                id=\"flexRadioDefault2\" (change)=\"onRadioChange()\">\n                        </div>\n                        <div class=\"\">\n                            <div class=\"scheme-title\">Individual Investment Scheme</div>\n                            <div class=\"scheme-details\">\n                                <span class=\"scheme-id\">GPP Id: {{redemptionData.GPPId}}</span>\n                                <span class=\"scheme-maturity\">Maturity Date: 12 April 2024</span>\n                            </div>\n                            <div class=\"scheme-amount\">\u20B9{{redemptionData.amount}}</div>\n                        </div>\n                    </div>\n                    <div class=\"scheme-monthly\">\u20B98000/M</div>\n                </label>\n            </div>\n        </div>\n        <div class=\"modal-footer gap-3\">\n            <div class=\"redemption-summary gap-2\">\n                <span class=\"redemption-label\">Redemption Amount</span>\n                <span class=\"redemption-value\">\u20B9{{selectedAmount ? selectedAmount : 0}}</span>\n            </div>\n            <div class=\"action-btns d-flex w-100 gap-2\"> <button class=\"cancel-btn\">Cancel</button>\n                <button class=\"apply-btn\" (click)=\"applyRedmption()\">Apply Redemption</button>\n            </div>\n        </div>\n    </div>\n</div>", styles: ["*{font-family:var(--website-font-family)}mat-icon{font-family:Material Icons!important}.main_page{background:#fff;z-index:100!important;padding:3%;box-shadow:#0000001a 0 4px 12px;overflow-y:hidden;width:35vw}.modal-header{display:flex;justify-content:space-between;align-items:center}.modal-header h2{font-size:14px;font-weight:600;color:#111827;margin:0}.close-btn mat-icon{font-size:20px}.modal-body{padding:24px 24px 0;height:46vh;overflow-y:scroll}.scheme-option{margin-bottom:16px}.scheme-option input[type=radio]:checked+.scheme-card{border-color:#06b6d4;background:#f0f9ff;position:relative}.scheme-option input[type=radio]:checked+.scheme-card:before{content:\"\";position:absolute;top:20px;left:20px;width:20px;height:20px;border:2px solid #06b6d4;border-radius:50%;background:#fff}.scheme-option input[type=radio]:checked+.scheme-card:after{content:\"\";position:absolute;top:26px;left:26px;width:8px;height:8px;background:#06b6d4;border-radius:50%}.scheme-card{display:flex;justify-content:space-between;align-items:center;padding:20px;border:2px solid #e5e7eb;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff}.scheme-card:hover{border-color:#d1d5db;background:#f9fafb}.form-check-radio{width:10%}.scheme-title{font-size:12px;font-weight:600;color:#111827;margin-bottom:8px}.scheme-details{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}.scheme-details span{font-size:12px}.scheme-monthly{font-size:14px;font-weight:600;color:#111827;min-width:100px;text-align:right}.modal-footer{display:flex;border-top:1px solid #e5e7eb;padding-top:1%}.redemption-summary{display:flex;justify-content:flex-start;align-items:center;width:100%}.redemption-label{font-size:16px;color:#374151}.redemption-value{font-size:20px;font-weight:700;color:#059669}.cancel-btn,.apply-btn{border:none;border-radius:6px;font-size:12px!important;padding:1%;font-weight:600;cursor:pointer;transition:all .2s ease}.cancel-btn{background:#fff;color:#374151;border:1px solid #d1d5db}.cancel-btn:hover{background:#f9fafb;border-color:#9ca3af}.apply-btn{background:#06b6d4;color:#fff}.apply-btn:hover{background:#0891b2}.redemption-summary span{font-size:12px;font-weight:700}.scheme-id,.scheme-maturity{font-size:14px;color:#6b7280}.scheme-amount{font-size:14px;font-weight:700;color:#06b6d4}\n"] }]
        }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: i2.RestService }] });
//# sourceMappingURL=data:application/json;base64, 