import { Host, h } from "@stencil/core";
export class IdentityAddressForm {
    constructor() {
        this.address = {};
        this.inputHandler = (name, value) => {
            this.address[name] = value;
            this.address = Object.assign({}, this.address);
        };
    }
    handleAddressChange(newValues) {
        this.handleFormUpdate(newValues);
    }
    render() {
        return (h(Host, { key: '71100bc3742c3efaa9c3a948bf3ac5c69281c559' }, h("form-address-fields", { key: 'e5e5399686aa272a9cbe45d6914ebeda6a1966f4', country: this.country, errors: this.errors, defaultValues: this.defaultValues, inputHandler: this.inputHandler })));
    }
    static get is() { return "identity-address-form"; }
    static get properties() {
        return {
            "handleFormUpdate": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "(values: any) => void",
                    "resolved": "(values: any) => void",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false
            },
            "errors": {
                "type": "any",
                "mutable": false,
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "errors"
            },
            "defaultValues": {
                "type": "any",
                "mutable": false,
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "default-values"
            },
            "country": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "CountryCode",
                    "resolved": "CountryCode.CAN | CountryCode.USA",
                    "references": {
                        "CountryCode": {
                            "location": "import",
                            "path": "../../../../utils/country-codes",
                            "id": "src/utils/country-codes.ts::CountryCode"
                        }
                    }
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "country"
            }
        };
    }
    static get states() {
        return {
            "address": {}
        };
    }
    static get watchers() {
        return [{
                "propName": "address",
                "methodName": "handleAddressChange"
            }];
    }
}
