import type { resolveContactImCallbackSetup } from './provider-form-adapters' import { Button } from '@langgenius/dify-ui/button' import { Field, FieldLabel } from '@langgenius/dify-ui/field' import { InputGroup, InputGroupAddon, InputGroupInput } from '@langgenius/dify-ui/input-group' import { useEffect, useRef } from 'react' import { Trans, useTranslation } from 'react-i18next' import { CopyFeedback } from '@/app/components/base/copy-feedback' type ContactImCallbackSetupProps = { callbackUrl: string providerName: string setup: ReturnType setupGuideUrl: string onBack: () => void onFinish: () => void } export function ContactImCallbackSetup({ callbackUrl, providerName, setup, setupGuideUrl, onBack, onFinish, }: ContactImCallbackSetupProps) { const { t } = useTranslation(['contacts']) const inputRef = useRef(null) useEffect(() => { inputRef.current?.focus() }, []) return (
{t(($) => $['imPlatform.bindingDialog.callback'])} $['imPlatform.action.copyCallback'])} copiedLabel={t(($) => $['imPlatform.action.copied'])} /> {setup && (

$[ `imPlatform.bindingDialog.callbackInstruction.${setup.instructionsKey}.destination` ] } components={{ console: ( {providerName} ), }} />

{t( ($) => $[`imPlatform.bindingDialog.callbackInstruction.${setup.instructionsKey}.path`], )}

)}
{t(($) => $['imPlatform.bindingDialog.viewSetupGuide'])}
) }