"use strict";
// The require scope
var __webpack_require__ = {};
/************************************************************************/ // webpack/runtime/compat_get_default_export
(()=>{
    // getDefaultExport function for compatibility with non-ESM modules
    __webpack_require__.n = function(module) {
        var getter = module && module.__esModule ? function() {
            return module['default'];
        } : function() {
            return module;
        };
        __webpack_require__.d(getter, {
            a: getter
        });
        return getter;
    };
})();
// webpack/runtime/define_property_getters
(()=>{
    __webpack_require__.d = function(exports1, definition) {
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
// webpack/runtime/has_own_property
(()=>{
    __webpack_require__.o = function(obj, prop) {
        return Object.prototype.hasOwnProperty.call(obj, prop);
    };
})();
// webpack/runtime/make_namespace_object
(()=>{
    // define __esModule on exports
    __webpack_require__.r = function(exports1) {
        if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
/************************************************************************/ var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
    default: ()=>/* binding */ JsonViewer_stories_rslib_entry_,
    Dark: ()=>/* binding */ Dark,
    Expanded: ()=>/* binding */ Expanded,
    Default: ()=>/* binding */ Default
});
const test_namespaceObject = require("@storybook/test");
const external_JsonViewer_js_namespaceObject = require("./JsonViewer.js");
var external_JsonViewer_js_default = /*#__PURE__*/ __webpack_require__.n(external_JsonViewer_js_namespaceObject);
const meta = {
    title: 'Components/JsonViewer',
    component: external_JsonViewer_js_default()
};
/* ESM default export */ const JsonViewer_stories_rslib_entry_ = meta;
const fakeSpec = {
    id: 'cplusg4phigjlosq46t0',
    string: 'Lorem ipsum dolor sit amet',
    integer: 42,
    float: 114.514,
    array: [
        19,
        100.86,
        'test',
        NaN,
        1 / 0
    ],
    anotherObj: {
        foo: 'bar'
    },
    nestedArray: [
        [
            1,
            2
        ],
        [
            3,
            4
        ]
    ],
    object: {
        'first-child': true,
        'second-child': false,
        'last-child': null
    },
    string_number: '1234',
    name: 'public-api-e2e-04785613684989232104',
    orgId: 'a845616f-0484-4506-9638-45fe28f34865',
    customerTier: 'CUSTOMER_TIER_STANDARD',
    tags: {
        'controlplane/cluster-no-delete-network': 'true',
        'controlplane/last-reconciliation': '2024-06-14T07:41:13Z',
        'featureflag/allow-all-vpcpeering-customer-cidrs': 'false',
        'featureflag/allow-vpcpeering-secondary-cidrs': 'false',
        'featureflag/enable-11-dot-iprange': 'true',
        'featureflag/enable-custom-cloud-tags': 'true',
        'featureflag/enable-dataplane-api': 'true',
        'featureflag/enable-grafana-cloud-loki-logs': 'false',
        'featureflag/enable-license-renew': 'true',
        'featureflag/enable-operator-v2': 'false',
        'featureflag/enable-private-console': 'true',
        'featureflag/enable-redpanda-min-rf-3': 'true',
        'featureflag/enable-self-hosted-loki-logs': 'true',
        'featureflag/enable-unsafe-decommission-failed-brokers': 'true',
        'featureflag/rpk-plugin-use-network-cidr-for-network': 'true',
        'featureflag/use_instance_load_balancer': 'true',
        'featureflag/use_network_spec_zones': 'true',
        'featureflag/use_spec_reserved_cpu_count': 'true',
        'featureflag/use_updated_aws_load_balancer_iam_policy': 'true',
        featureFlagEnableAWSClusterNetworkAZFix: 'true',
        featureFlagManageAwsEksAddons: 'false',
        featureFlagUseRegionalCloudStorageCredentialsHost: 'true',
        namespaceId: '11bf6617-ec80-4edf-8dab-cd95e453ad2a',
        organizationId: 'a845616f-0484-4506-9638-45fe28f34865',
        ownerId: '50S5nVh7UTS1gO1OUWctIMYXgxYeGMF1@clients',
        preset: 'PRESET_PUBLIC_ACCESS'
    },
    createdAt: '2024-06-14T07:16:16.419Z',
    updatedAt: '2024-06-14T07:57:10.497Z',
    spec: {
        clusterType: 'CLUSTER_TYPE_FMC',
        installPackVersion: '24.1.20240613234047',
        provider: 'CLOUD_PROVIDER_AWS',
        region: 'us-east-2',
        zones: [
            'use2-az1',
            'use2-az2',
            'use2-az3'
        ],
        isMultiAz: true,
        machineType: 'im4gn.large',
        nodesCount: 3,
        dnsZones: {
            zones: [
                {
                    name: 'redpanda_cloud_default',
                    fqdn: 'cplusg4phigjlosq46t0.fmc.ign.cloud.redpanda.com.',
                    zoneType: 'DNS_ZONE_TYPE_REAL_DOMAIN'
                }
            ]
        },
        storage: {
            storageType: 'local-path',
            storageSizeBytes: '0'
        },
        kafkaListeners: {
            listeners: [
                {
                    name: 'default',
                    port: 30092,
                    sasl: {
                        protocol: 'SASL_PROTOCOL_SASL_SCRAM_256',
                        mechanism: 'SASL_MECHANISM_SCRAM'
                    },
                    tls: {
                        issuerType: 'CERT_ISSUER_TYPE_LETSENCRYPT',
                        requireClientAuth: false,
                        clientCaCerts: []
                    },
                    listenerNetworkType: 'LISTENER_NETWORK_TYPE_EXTERNAL',
                    zoneFqdn: 'cplusg4phigjlosq46t0.fmc.ign.cloud.redpanda.com.',
                    alternativeZoneFqdns: [],
                    dnsRandomizer: '12448f6d',
                    securityProtocol: 'SECURITY_PROTOCOL_SASL_SSL'
                }
            ],
            authorizationEnabled: true
        },
        adminApi: {
            enabled: false,
            authentication: 'HTTP_AUTHENTICATION_UNSPECIFIED',
            zoneFqdn: '',
            alternativeZoneFqdns: [],
            dnsRandomizer: ''
        },
        pandaProxy: {
            enabled: true,
            authentication: 'HTTP_AUTHENTICATION_BASIC',
            tls: {
                issuerType: 'CERT_ISSUER_TYPE_LETSENCRYPT',
                requireClientAuth: false,
                clientCaCerts: []
            },
            zoneFqdn: 'cplusg4phigjlosq46t0.fmc.ign.cloud.redpanda.com.',
            alternativeZoneFqdns: [],
            dnsRandomizer: 'a19bded3'
        },
        schemaRegistry: {
            enabled: true,
            authentication: 'HTTP_AUTHENTICATION_BASIC',
            tls: {
                issuerType: 'CERT_ISSUER_TYPE_LETSENCRYPT',
                requireClientAuth: false,
                clientCaCerts: []
            },
            zoneFqdn: 'cplusg4phigjlosq46t0.fmc.ign.cloud.redpanda.com.',
            alternativeZoneFqdns: [],
            dnsRandomizer: '8490e42c'
        },
        clusterConfig: {
            audit_enabled: true,
            kafka_batch_max_bytes: '1048576',
            kafka_connections_max: '3700',
            compacted_log_segment_size: '67108864',
            topic_partitions_per_shard: '1066',
            kafka_connection_rate_limit: '1000',
            cloud_storage_enable_remote_write: true,
            enable_usage: true,
            log_segment_size_max: '134217728',
            log_segment_size_min: '16777216',
            group_topic_partitions: '6',
            kafka_rpc_server_tcp_send_buf: '102400',
            space_management_enable_override: true,
            cloud_storage_manifest_cache_size: '16777216',
            retention_local_target_ms_default: '21600000',
            disk_reservation_percent: '0',
            kafka_rpc_server_tcp_recv_buf: '102400',
            enable_controller_log_rate_limiting: true,
            cloud_storage_spillover_manifest_size: '65536',
            log_segment_size: '134217728',
            aggregate_metrics: true,
            retention_local_strict: false,
            use_fetch_scheduler_group: true,
            default_topic_replications: '3',
            raft_learner_recovery_rate: '104857600',
            cloud_storage_enable_remote_read: true,
            rps_limit_configuration_operations: '10',
            cloud_storage_segment_max_upload_interval_sec: '3600',
            rps_limit_move_operations: '1000',
            kafka_throughput_limit_node_in_bps: '20000000',
            rps_limit_node_management_operations: '10',
            rpc_server_listen_backlog: '1000',
            minimum_topic_replications: '3',
            rps_limit_topic_operations: '100',
            max_concurrent_producer_ids: '3700',
            fetch_reads_debounce_timeout: '5',
            partition_autobalancing_mode: 'continuous',
            kafka_enable_partition_reassignment: false,
            retention_local_target_capacity_percent: '70',
            space_management_enable: true,
            topic_memory_per_partition: '3145728',
            retention_local_strict_override: false,
            cloud_storage_cache_size_percent: '15',
            transaction_coordinator_partitions: '6',
            kafka_throughput_limit_node_out_bps: '60000000',
            initial_retention_local_target_ms_default: '10800000',
            log_segment_ms_min: '300000',
            max_compacted_log_segment_size: '268435456',
            rpc_client_connections_per_peer: '80',
            rps_limit_acls_and_users_operations: '100'
        },
        sinkMetrics: false,
        sinkLogs: false,
        console: {
            rbac: {
                enabled: true,
                roleBindings: [
                    {
                        subjects: [],
                        roleName: 'viewer'
                    },
                    {
                        subjects: [],
                        roleName: 'editor'
                    },
                    {
                        subjects: [
                            {
                                kind: 'user',
                                provider: 'RedpandaCloud',
                                name: 'oidc|iL2bClCNeNrKxEym-okta-connection|00ucgngutxs0RdqmN696'
                            }
                        ],
                        roleName: 'admin'
                    }
                ]
            },
            login: {
                enabled: true,
                redpandaCloud: {
                    enabled: true,
                    domain: 'integration-cloudv2.us.auth0.com',
                    audience: 'cloudv2-ign.redpanda.cloud',
                    allowedOrigins: [
                        'https://main--redpanda-cloud.netlify.app',
                        'https://integration-redpanda-cloud.netlify.app',
                        'https://integration--redpanda-cloud.netlify.app',
                        'https://redpanda-api-documentation.netlify.app'
                    ]
                }
            },
            licenseKey: {
                name: 'redpanda-license',
                version: '0'
            },
            prometheusBasicAuthRef: {
                username: 'prometheus',
                passwordRef: {
                    name: 'console-prometheus-password',
                    version: '0'
                }
            },
            loadBalancerType: 'LOAD_BALANCER_TYPE_EXTERNAL'
        },
        kernelTuningOverrides: {},
        connectors: {
            enabled: true,
            machineType: 'c5.large',
            minInstances: 1,
            maxInstances: 10,
            targetCpu: 0,
            javaMaxHeapSize: '2G',
            logLevel: 'warn',
            requestCpu: '1',
            additionalConfig: '',
            tasksPerPod: 4
        },
        cloudsmithEntitlementTokenRef: {
            name: 'cloudsmith-entitlement-token',
            version: '0'
        },
        grafanaApiKeyRef: {
            name: 'grafana-api-token',
            version: '0'
        },
        containerRegistry: {
            host: 'docker.cloudsmith.io',
            username: 'redpanda/cloudv2-integration',
            passwordRef: {
                name: 'cloudsmith-entitlement-token',
                version: '0'
            }
        },
        licenseKeyRef: {
            name: 'redpanda-license',
            version: '0'
        },
        cloudStorageBucket: {
            aws: {
                name: 'redpanda-cloud-storage-cplusg4phigjlosq46t0',
                accelerationEnabled: false
            }
        },
        networkId: 'cpluqskphigjlosq46kg',
        network: {
            networkCidr: '10.0.0.0/20'
        },
        agent: {
            proxyAddress: 'agent-proxy.ign.cloud.redpanda.com:443',
            temporalNamespace: 'integration-control-plane.oizex'
        },
        configProfileName: 'tier-1-aws-v2-arm',
        maintenanceWindowConfig: {
            anytime: {
                batch: 'BATCH_TYPE_STABLE'
            }
        },
        clusterConfigOverrides: {},
        metering: {
            enabled: true,
            primaryToken: {
                name: 'metering-api-token',
                version: '0'
            },
            apiAddress: 'metering-api.ign.cloud.redpanda.com:443'
        },
        k8sVersion: {
            enabled: true,
            controlPlaneVersion: '1.27',
            nodeVersion: 'ubuntu-eks/k8s_1.27/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20240322'
        },
        reservedCpuCount: 1,
        productName: 'tier-1-aws-v2-arm',
        privateLinkService: {
            enabled: false,
            aws: {
                kafkaApiSeedPort: 30292,
                schemaRegistrySeedPort: 30081,
                redpandaProxySeedPort: 30282,
                kafkaApiNodeBasePort: 32092,
                redpandaProxyNodeBasePort: 35082,
                allowedPrincipals: [],
                consolePort: 0
            },
            connectConsole: false
        },
        utilityNodePool: {
            machineTypeName: 'm5.large',
            minCount: 2,
            maxCount: 3
        },
        cloudAccount: {
            awsConfig: {
                accountId: '339713080728'
            }
        },
        readReplicaClusterIds: [],
        lifecycle: {
            deletingState: {
                waitForCleanupGracePeriod: {
                    seconds: '43200',
                    nanos: 0
                }
            }
        },
        telemetry: {
            enabled: true,
            primaryToken: {
                name: 'telemetry-api-token',
                version: '0'
            },
            apiAddress: 'telemetry-api.ign.cloud.redpanda.com:443'
        },
        redpandaConnect: {
            nodePool: {
                machineTypeName: 'c6i.large',
                minCount: 1,
                maxCount: 1
            }
        }
    },
    status: {
        health: {
            metadata: {
                source: 'redpanda-agent'
            },
            state: 'STATE_HEALTHY'
        },
        dnsZones: {
            redpanda_cloud_default: {
                name: 'redpanda_cloud_default',
                metadata: {
                    source: 'redpanda-agent',
                    status: {
                        code: 0,
                        message: '',
                        details: []
                    }
                },
                fqdn: 'cplusg4phigjlosq46t0.fmc.ign.cloud.redpanda.com.',
                nameservers: [
                    'ns-1277.awsdns-31.org',
                    'ns-132.awsdns-16.com',
                    'ns-1645.awsdns-13.co.uk',
                    'ns-791.awsdns-34.net'
                ]
            }
        },
        listeners: {
            kafka: {
                default: {
                    metadata: {
                        source: 'redpanda-agent',
                        status: {
                            code: 0,
                            message: '',
                            details: []
                        }
                    },
                    name: 'default',
                    seedEndpoints: [
                        'seed-12448f6d.cplusg4phigjlosq46t0.fmc.ign.cloud.redpanda.com:9092'
                    ]
                }
            },
            adminApi: {},
            schemaRegistry: {
                'schema-registry': {
                    metadata: {
                        source: 'redpanda-agent',
                        status: {
                            code: 0,
                            message: '',
                            details: []
                        }
                    },
                    name: 'schema-registry',
                    urls: [
                        'https://schema-registry-8490e42c.cplusg4phigjlosq46t0.fmc.ign.cloud.redpanda.com:30081'
                    ]
                }
            },
            pandaProxy: {
                'panda-proxy': {
                    metadata: {
                        source: 'redpanda-agent',
                        status: {
                            code: 0,
                            message: '',
                            details: []
                        }
                    },
                    name: 'panda-proxy',
                    urls: [
                        'https://pandaproxy-a19bded3.cplusg4phigjlosq46t0.fmc.ign.cloud.redpanda.com:30082'
                    ]
                }
            },
            redpandaConsole: {
                default: {
                    metadata: {
                        source: 'redpanda-agent',
                        reportedAt: '2024-06-14T08:03:16.717Z',
                        status: {
                            code: 0,
                            message: '',
                            details: []
                        }
                    },
                    name: 'default',
                    urls: [
                        'https://console-12448f6d.cplusg4phigjlosq46t0.fmc.ign.cloud.redpanda.com'
                    ]
                },
                'dataplane-api-public': {
                    metadata: {
                        source: 'redpanda-agent',
                        reportedAt: '2024-06-14T08:03:16.717Z',
                        status: {
                            code: 0,
                            message: '',
                            details: []
                        }
                    },
                    name: 'dataplane-api-public',
                    urls: [
                        'https://api-12448f6d.cplusg4phigjlosq46t0.fmc.ign.cloud.redpanda.com'
                    ]
                }
            }
        },
        agent: {
            lastSeen: {
                metadata: {
                    source: 'agent-proxy',
                    reportedAt: '2024-06-14T08:22:49.583Z',
                    status: {
                        code: 0,
                        message: '',
                        details: []
                    }
                },
                timestamp: '2024-06-14T08:22:47.068Z'
            },
            lastReconciliation: {
                metadata: {
                    source: 'redpanda-agent',
                    reportedAt: '2024-06-14T08:09:04.939Z',
                    status: {
                        code: 2,
                        message: 'template: tfvars:57:60: executing "tfvars" at <.Req.Resource.Redpanda.Spec.RedpandaConnect.NodePool>: nil pointer evaluating *controlplanev1.RedpandaConnectSpec.NodePool',
                        details: []
                    }
                },
                timestamp: '2024-06-14T08:09:04.939Z',
                eventId: 'cplvfloim3iivdq3a38g'
            }
        },
        firstHealthy: {
            metadata: {
                source: 'operations',
                reportedAt: '2024-06-14T07:51:56.491Z',
                status: {
                    code: 0,
                    message: '',
                    details: []
                }
            },
            timestamp: '2024-06-14T07:51:56.491Z'
        },
        installPackVersion: '24.1.20240607152351',
        lifecycleEvents: {
            provisioning_started: {
                metadata: {
                    source: 'operations',
                    reportedAt: '2024-06-14T07:17:41.455Z',
                    status: {
                        code: 0,
                        message: '',
                        details: []
                    }
                },
                timestamp: '2024-06-14T07:17:41.455Z'
            }
        },
        nodesCount: 3,
        redpandaLicense: {
            metadata: {
                source: 'control-plane',
                reportedAt: '2024-06-14T07:20:13.885Z',
                status: {
                    code: 0,
                    message: '',
                    details: []
                }
            },
            expiry: '1749426436'
        },
        consoleLicense: {
            metadata: {
                source: 'control-plane',
                reportedAt: '2024-06-14T07:20:13.885Z',
                status: {
                    code: 0,
                    message: '',
                    details: []
                }
            },
            expiry: '1749426436'
        },
        metering: {
            primaryKeyExpiresAt: '1970-01-01T00:00:00.000Z'
        },
        telemetry: {
            primaryKeyExpiresAt: '1970-01-01T00:00:00.000Z'
        }
    },
    state: 'STATE_UPGRADING',
    updateLocked: false,
    stateChangedAt: '2024-06-14T07:57:10.497Z',
    resourceVersion: '7',
    stateDescription: {
        code: 0,
        message: 'Changing state to UPGRADING because spec.install_pack_version changed from 24.1.20240607152351 to 24.1.20240613234047',
        details: []
    },
    cloudProviderTags: {
        'redpanda-managed': 'true'
    }
};
const Default = {
    args: {
        value: fakeSpec
    },
    play: async ({ canvasElement, step })=>{
        const canvas = (0, test_namespaceObject.within)(canvasElement);
        await step('Check content', async ()=>{
            (0, test_namespaceObject.expect)((0, test_namespaceObject.within)(canvas.getByTestId('json-viewer')).getByText('"root"')).toBeVisible();
            (0, test_namespaceObject.expect)((0, test_namespaceObject.within)(canvas.getByTestId('json-viewer')).getByTestId('data-key-pairspec.networkId')).toBeVisible();
        });
        await step('Hide', async ()=>{
            test_namespaceObject.fireEvent.click((0, test_namespaceObject.within)(canvas.getByTestId('json-viewer')).getByText('"root"'));
            (0, test_namespaceObject.expect)((0, test_namespaceObject.within)(canvas.getByTestId('json-viewer')).queryByText('networkId')).not.toBeInTheDocument();
        });
        await step('Expand', async ()=>{
            test_namespaceObject.fireEvent.click((0, test_namespaceObject.within)(canvas.getByTestId('json-viewer')).getByText('"root"'));
        });
    }
};
// Beware of potential performance issues for large datasets.
const Expanded = {
    args: {
        value: fakeSpec,
        defaultExpanded: true
    }
};
const Dark = {
    args: {
        value: fakeSpec,
        theme: 'dark'
    }
};
var __webpack_export_target__ = exports;
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
    value: true
});
