import { Component, inject, InjectionToken, ViewEncapsulation } from '@angular/core';
import { ROUTE_COMPONENT_OPTIONS, RouteComponent, SharedModule } from '@vendure/admin-ui/core';
import { ReactComponentHostDirective } from '../directives/react-component-host.directive';
import * as i0 from "@angular/core";
export const REACT_ROUTE_COMPONENT_OPTIONS = new InjectionToken('REACT_ROUTE_COMPONENT_OPTIONS');
export class ReactRouteComponent {
    constructor() {
        this.props = inject(REACT_ROUTE_COMPONENT_OPTIONS).props;
        this.reactComponent = inject(ROUTE_COMPONENT_OPTIONS).component;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ReactRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: ReactRouteComponent, isStandalone: true, selector: "vdr-react-route-component", ngImport: i0, template: `
        <vdr-route-component
            ><div [vdrReactComponentHost]="reactComponent" [props]="props"></div
        ></vdr-route-component>
    `, 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"] }, { kind: "component", type: RouteComponent, selector: "vdr-route-component" }, { kind: "ngmodule", type: SharedModule }], encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ReactRouteComponent, decorators: [{
            type: Component,
            args: [{ selector: 'vdr-react-route-component', template: `
        <vdr-route-component
            ><div [vdrReactComponentHost]="reactComponent" [props]="props"></div
        ></vdr-route-component>
    `, encapsulation: ViewEncapsulation.None, standalone: true, imports: [ReactComponentHostDirective, RouteComponent, SharedModule], 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhY3Qtcm91dGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpYi9yZWFjdC9zcmMvY29tcG9uZW50cy9yZWFjdC1yb3V0ZS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsY0FBYyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3JGLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxjQUFjLEVBQUUsWUFBWSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDL0YsT0FBTyxFQUFFLDJCQUEyQixFQUFFLE1BQU0sOENBQThDLENBQUM7O0FBRzNGLE1BQU0sQ0FBQyxNQUFNLDZCQUE2QixHQUFHLElBQUksY0FBYyxDQUMzRCwrQkFBK0IsQ0FDbEMsQ0FBQztBQWNGLE1BQU0sT0FBTyxtQkFBbUI7SUFaaEM7UUFhYyxVQUFLLEdBQUcsTUFBTSxDQUFDLDZCQUE2QixDQUFDLENBQUMsS0FBSyxDQUFDO1FBQ3BELG1CQUFjLEdBQUcsTUFBTSxDQUFDLHVCQUF1QixDQUFDLENBQUMsU0FBUyxDQUFDO0tBQ3hFOzhHQUhZLG1CQUFtQjtrR0FBbkIsbUJBQW1CLHFGQVZsQjs7OztLQUlULG8rRUFJUywyQkFBMkIsMkhBQUUsY0FBYywrREFBRSxZQUFZOzsyRkFFMUQsbUJBQW1CO2tCQVovQixTQUFTOytCQUNJLDJCQUEyQixZQUMzQjs7OztLQUlULGlCQUVjLGlCQUFpQixDQUFDLElBQUksY0FDekIsSUFBSSxXQUNQLENBQUM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