import {Fragment} from 'react';
import ExternalLink from 'sentry/components/links/externalLink';
import List from 'sentry/components/list';
import ListItem from 'sentry/components/list/listItem';
import crashReportCallout from 'sentry/components/onboarding/gettingStartedDoc/feedback/crashReportCallout';
import widgetCallout from 'sentry/components/onboarding/gettingStartedDoc/feedback/widgetCallout';
import TracePropagationMessage from 'sentry/components/onboarding/gettingStartedDoc/replay/tracePropagationMessage';
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/step';
import type {
Docs,
DocsParams,
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {
getCrashReportJavaScriptInstallStep,
getCrashReportModalConfigDescription,
getCrashReportModalIntroduction,
getFeedbackConfigureDescription,
getFeedbackSDKSetupSnippet,
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
import {getJSMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import {
getReplayConfigureDescription,
getReplaySDKSetupSnippet,
getReplayVerifyStep,
} from 'sentry/components/onboarding/gettingStartedDoc/utils/replayOnboarding';
import {t, tct} from 'sentry/locale';
type Params = DocsParams;
const getConfigStep = ({isSelfHosted, organization, projectSlug}: Params) => {
const urlParam = isSelfHosted ? '' : '--saas';
return [
{
description: tct(
'Configure your app automatically by running the [wizardLink:Sentry wizard] in the root of your project.',
{
wizardLink: (
{tct(
"Sentry's integration with [remixLink:Remix] supports Remix 1.0.0 and above.",
{
remixLink:
,
}
)}
,
}
)}
,
}
)}
,
}
)}
{tct(
'Start your development server and visit [code:/sentry-example-page] if you have set it up. Click the button to trigger a test error.',
{
code: ,
}
)}
{t( 'Or, trigger a sample error by calling a function that does not exist somewhere in your application.' )}
}
)}
,
}
),
configurations: getConfigStep(params),
},
],
configure: (params: Params) => [
{
type: StepType.CONFIGURE,
description: getFeedbackConfigureDescription({
linkConfig:
'https://docs.sentry.io/platforms/javascript/guides/remix/user-feedback/configuration/',
linkButton:
'https://docs.sentry.io/platforms/javascript/guides/remix/user-feedback/configuration/#bring-your-own-button',
}),
configurations: [
{
code: [
{
label: 'entry.client.tsx',
value: 'javascript',
language: 'javascript',
code: getFeedbackSDKSetupSnippet({
importStatement: `import * as Sentry from "@sentry/remix";`,
dsn: params.dsn.public,
feedbackOptions: params.feedbackOptions,
}),
},
],
},
],
additionalInfo: (
{tct(
'Note: The Feedback integration only needs to be added to your [code:entry.client.tsx] file.',
{code: }
)}