"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateSidepanelToggle = generateSidepanelToggle;
function generateSidepanelToggle() {
    return `import { PanelRightIcon } from 'lucide-react'
import { useLocation } from '@tanstack/react-router'

import { Button } from '@postxl/ui-components'

import { APP_CONFIG } from '@lib/config'
import { useAiAssistantActions, useAiAssistantState } from './ai-assistant-store'

export const SidepanelToggle = () => {
  const pathname = useLocation({ select: (location) => location.pathname })
  const open = useAiAssistantState((state) => state.open)
  const { setOpen } = useAiAssistantActions()
  const isAdminRoute = pathname.startsWith('/admin')

  if (!APP_CONFIG.enableAI && !isAdminRoute) {
    return null
  }

  return (
    <Button
      variant="outline"
      size="icon"
      className="fixed right-4 top-4 z-40"
      onClick={() => setOpen(!open)}
      aria-label={open ? 'Close sidepanel' : 'Open sidepanel'}
    >
      <PanelRightIcon className="size-4" />
    </Button>
  )
}
`;
}
//# sourceMappingURL=sidepanel-toggle.generator.js.map