chore: update embed snippet tab (#40246)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- The option to toggle the navigation bar is now only visible when a
specific AI Agent feature is disabled.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Pawan Kumar 2025-04-15 13:20:17 +05:30 committed by GitHub
parent 32db30a447
commit dc516f3432
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,6 +16,7 @@ import { PrivateEmbedSettings } from "ee/pages/Applications/PrivateEmbedSettings
import { getCurrentApplication } from "ee/selectors/applicationSelectors";
import { useIsCloudBillingEnabled } from "hooks";
import { ChromeExtensionBanner } from "ee/pages/Applications/ChromeExtensionBanner";
import { getIsAiAgentFlowEnabled } from "ee/selectors/aiAgentSelectors";
export const StyledPropertyHelpLabel = styled(PropertyHelpLabel)`
.bp3-popover-content > div {
@ -57,6 +58,7 @@ export function ShareModal() {
selectedMethod,
);
const isCloudBillingEnabled = useIsCloudBillingEnabled();
const isAiAgentFlowEnabled = useSelector(getIsAiAgentFlowEnabled);
return (
<div className="flex flex-col gap-6">
@ -90,18 +92,20 @@ export function ShareModal() {
</div>
)}
<Switch
data-testid={"show-navigation-bar-toggle"}
defaultSelected={embedSnippet.currentEmbedSetting?.showNavigationBar}
onChange={() =>
embedSnippet.onChange({
showNavigationBar:
!embedSnippet.currentEmbedSetting.showNavigationBar,
})
}
>
{createMessage(IN_APP_EMBED_SETTING.showNavigationBar)}
</Switch>
{Boolean(isAiAgentFlowEnabled) === false && (
<Switch
data-testid={"show-navigation-bar-toggle"}
defaultSelected={embedSnippet.currentEmbedSetting?.showNavigationBar}
onChange={() =>
embedSnippet.onChange({
showNavigationBar:
!embedSnippet.currentEmbedSetting.showNavigationBar,
})
}
>
{createMessage(IN_APP_EMBED_SETTING.showNavigationBar)}
</Switch>
)}
{!isPublicApp && (
<PrivateEmbedSettings