import { Component, inject, InjectionToken, ViewEncapsulation } from '@angular/core';
import { ReactComponentHostDirective } from '../directives/react-component-host.directive';
import * as i0 from "@angular/core";
export const REACT_INPUT_COMPONENT_OPTIONS = new InjectionToken('REACT_INPUT_COMPONENT_OPTIONS');
export class ReactFormInputComponent {
    constructor() {
        this.reactComponent = inject(REACT_INPUT_COMPONENT_OPTIONS).component;
    }
    static { this.id = 'react-form-input-component'; }
    ngOnInit() {
        this.context = {
            formControl: this.formControl,
            readonly: this.readonly,
            config: this.config,
        };
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ReactFormInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: ReactFormInputComponent, isStandalone: true, selector: "vdr-react-form-input-component", ngImport: i0, template: ` <div [vdrReactComponentHost]="reactComponent" [context]="context" [props]="context"></div> `, isInline: true, styles: [":host,.vdr-card{display:block;--card-padding: calc(var(--space-unit) * 3);container-type:inline-size}.card-container{border:1px solid var(--color-card-border);background-color:var(--color-card-bg);border-radius:var(--border-radius);padding:var(--card-padding) 0;box-shadow:0 2px 4px #0000000d}@container (max-width: 400px){.card-container{--card-padding: calc(var(--space-unit) * 2)}}.card-container.padding-x{padding-inline-start:var(--card-padding);padding-inline-end:var(--card-padding)}.title-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--card-padding)}.title{font-size:var(--font-size-base);padding:0 var(--card-padding)}.padding-x .title{padding:0}::ng-deep vdr-card+vdr-card{margin-top:calc(var(--space-unit) * 2)}.vdr-card+.vdr-card{margin-top:calc(var(--space-unit) * 2)}:host{display:block}.form-group label{font-size:var(--font-size-sm);color:var(--color-weight-800);margin-bottom:4px;display:inline-block}.tooltip-text{font-size:var(--font-size-xs);line-height:var(--font-size-sm);margin-bottom:4px}.input-row{display:flex}::ng-deep .input-row input:not([type=checkbox]),::ng-deep .input-row select,::ng-deep .input-row textarea,::ng-deep .input-row vdr-zone-selector,::ng-deep .input-row vdr-facet-value-selector,::ng-deep .input-row vdr-option-value-input,::ng-deep .input-row vdr-affixed-input,::ng-deep .input-row vdr-currency-input,::ng-deep .input-row vdr-rich-text-editor{width:100%}.input-row input:not([type=checkbox]),.input-row select,.input-row textarea{width:100%}:host,.vdr-action-bar{display:flex;justify-content:space-between;align-items:baseline;z-index:25;flex-direction:column-reverse}:host>.grow,.vdr-action-bar>.grow{flex:1}:host .right-content,.vdr-action-bar .right-content{width:100%;display:flex;justify-content:flex-end}:host ::ng-deep vdr-ab-right>*:last-child,.vdr-action-bar ::ng-deep vdr-ab-right>*:last-child{margin-inline-end:0px}@media screen and (min-width: 768px){:host,.vdr-action-bar{flex-direction:row}:host .right-content,.vdr-action-bar .right-content{width:initial}}:host,.vdr-page-detail-layout{display:grid;grid-template-columns:3fr 1fr}@media screen and (max-width: 992px){:host{grid-template-columns:1fr}}.sidebar{padding:var(--space-unit)}.form-group .input-row.invalid input:not([type=checkbox]):not([type=radio]),.form-group .input-row.invalid select,.form-group .input-row.invalid textarea{color:var(--color-error-700);border-color:var(--color-error-300)}\n"], dependencies: [{ kind: "directive", type: ReactComponentHostDirective, selector: "[vdrReactComponentHost]", inputs: ["vdrReactComponentHost", "props", "context"] }], encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ReactFormInputComponent, decorators: [{
            type: Component,
            args: [{ selector: 'vdr-react-form-input-component', template: ` <div [vdrReactComponentHost]="reactComponent" [context]="context" [props]="context"></div> `, encapsulation: ViewEncapsulation.None, standalone: true, imports: [ReactComponentHostDirective], styles: [":host,.vdr-card{display:block;--card-padding: calc(var(--space-unit) * 3);container-type:inline-size}.card-container{border:1px solid var(--color-card-border);background-color:var(--color-card-bg);border-radius:var(--border-radius);padding:var(--card-padding) 0;box-shadow:0 2px 4px #0000000d}@container (max-width: 400px){.card-container{--card-padding: calc(var(--space-unit) * 2)}}.card-container.padding-x{padding-inline-start:var(--card-padding);padding-inline-end:var(--card-padding)}.title-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--card-padding)}.title{font-size:var(--font-size-base);padding:0 var(--card-padding)}.padding-x .title{padding:0}::ng-deep vdr-card+vdr-card{margin-top:calc(var(--space-unit) * 2)}.vdr-card+.vdr-card{margin-top:calc(var(--space-unit) * 2)}:host{display:block}.form-group label{font-size:var(--font-size-sm);color:var(--color-weight-800);margin-bottom:4px;display:inline-block}.tooltip-text{font-size:var(--font-size-xs);line-height:var(--font-size-sm);margin-bottom:4px}.input-row{display:flex}::ng-deep .input-row input:not([type=checkbox]),::ng-deep .input-row select,::ng-deep .input-row textarea,::ng-deep .input-row vdr-zone-selector,::ng-deep .input-row vdr-facet-value-selector,::ng-deep .input-row vdr-option-value-input,::ng-deep .input-row vdr-affixed-input,::ng-deep .input-row vdr-currency-input,::ng-deep .input-row vdr-rich-text-editor{width:100%}.input-row input:not([type=checkbox]),.input-row select,.input-row textarea{width:100%}:host,.vdr-action-bar{display:flex;justify-content:space-between;align-items:baseline;z-index:25;flex-direction:column-reverse}:host>.grow,.vdr-action-bar>.grow{flex:1}:host .right-content,.vdr-action-bar .right-content{width:100%;display:flex;justify-content:flex-end}:host ::ng-deep vdr-ab-right>*:last-child,.vdr-action-bar ::ng-deep vdr-ab-right>*:last-child{margin-inline-end:0px}@media screen and (min-width: 768px){:host,.vdr-action-bar{flex-direction:row}:host .right-content,.vdr-action-bar .right-content{width:initial}}:host,.vdr-page-detail-layout{display:grid;grid-template-columns:3fr 1fr}@media screen and (max-width: 992px){:host{grid-template-columns:1fr}}.sidebar{padding:var(--space-unit)}.form-group .input-row.invalid input:not([type=checkbox]):not([type=radio]),.form-group .input-row.invalid select,.form-group .input-row.invalid textarea{color:var(--color-error-700);border-color:var(--color-error-300)}\n"] }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjoz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