@burdenoff/microfe-tours 2026.624.1 → 2026.625.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"TourPreviewPage.js","names":[],"sources":["../../../src/tours/pages/TourPreviewPage.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { useParams, useNavigate } from 'react-router-dom';\nimport {\n ArrowLeft,\n ChevronLeft,\n ChevronRight,\n X,\n Smartphone,\n Tablet,\n Monitor,\n CheckCircle,\n AlertCircle,\n} from 'lucide-react';\nimport { useTourPreview } from '../hooks/useTourPreview';\nimport { useTourBuilder } from '../hooks/useTourBuilder';\nimport { useToursPermissionAccess } from '../hooks/useToursPermissionAccess';\nimport { useToursContext } from '../providers/ToursProvider';\nimport { useToursStore } from '../store/toursStore';\nimport { TOUR_PERMISSIONS } from '../../constants/permissions';\nimport { useToursI18n } from '../i18n';\n\n/**\n * Tour preview page\n * Preview tour with device simulation and validation\n */\nexport function TourPreviewPage() {\n const { tr } = useToursI18n();\n const { tourId } = useParams();\n const navigate = useNavigate();\n const { basePath = '/' } = useToursContext();\n const { hasPermission } = useToursPermissionAccess();\n const canReadTour = hasPermission(TOUR_PERMISSIONS.TOUR_READ);\n const { tour, loadTour } = useTourBuilder(tourId);\n const { devicePreview } = useToursStore();\n\n const {\n isPreviewActive,\n currentStepIndex,\n currentStep,\n totalSteps,\n canGoNext,\n canGoPrevious,\n validationResults,\n startPreview,\n stopPreview,\n nextStep,\n previousStep,\n changeDevice,\n validateForPreview,\n } = useTourPreview(tour || undefined);\n\n useEffect(() => {\n if (tourId) {\n loadTour(tourId);\n }\n }, [tourId, loadTour]);\n\n useEffect(() => {\n if (tour) {\n validateForPreview();\n }\n }, [tour, devicePreview, validateForPreview]);\n\n if (!canReadTour) {\n return (\n <div className=\"flex items-center justify-center h-screen bg-bg-sunken\">\n <div className=\"text-center\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-2\">\n {tr('tourPreview.accessDeniedTitle')}\n </h2>\n <p className=\"text-sm text-text-secondary\">{tr('tourPreview.accessDeniedMessage')}</p>\n </div>\n </div>\n );\n }\n\n if (!tour) {\n return (\n <div className=\"flex items-center justify-center h-screen bg-bg-sunken\">\n <p className=\"text-text-secondary\">{tr('tourPreview.loading')}</p>\n </div>\n );\n }\n\n const handleBack = () => {\n navigate(`${basePath}/${tourId}/edit`);\n };\n\n const deviceIcons = {\n mobile: <Smartphone size={20} />,\n tablet: <Tablet size={20} />,\n desktop: <Monitor size={20} />,\n };\n\n return (\n <div className=\"flex flex-col h-screen bg-bg-sunken\">\n {/* Header */}\n <div className=\"border-b border-border-subtle bg-bg-surface p-3 sm:p-4 flex flex-wrap items-center gap-3 sm:gap-4\">\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"p-2 min-h-[44px] min-w-[44px] hover:bg-accent rounded-md\"\n aria-label={tr('tourBuilder.goBack')}\n >\n <ArrowLeft size={20} />\n </button>\n <div className=\"flex-1 min-w-[12rem]\">\n <h1 className=\"text-base sm:text-lg font-semibold truncate\">\n {tour?.name} - {tr('tourPreview.previewSuffix')}\n </h1>\n {isPreviewActive && (\n <p className=\"text-sm text-text-secondary\">\n {tr('tourPreview.stepOf')} {currentStepIndex + 1} {tr('tourPreview.stepOfConnector')}{' '}\n {totalSteps}\n </p>\n )}\n </div>\n\n {/* Device Selector */}\n <div className=\"flex gap-2 border border-border-subtle rounded-md overflow-hidden\">\n {(['mobile', 'tablet', 'desktop'] as const).map((device) => (\n <button\n type=\"button\"\n key={device}\n onClick={() => changeDevice(device)}\n className={`px-3 py-2 min-h-[44px] min-w-[44px] ${\n devicePreview === device\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'bg-bg-surface hover:bg-accent'\n }`}\n title={\n device === 'mobile'\n ? tr('tourPreview.deviceMobile')\n : device === 'tablet'\n ? tr('tourPreview.deviceTablet')\n : tr('tourPreview.deviceDesktop')\n }\n aria-label={\n device === 'mobile'\n ? tr('tourPreview.deviceMobile')\n : device === 'tablet'\n ? tr('tourPreview.deviceTablet')\n : tr('tourPreview.deviceDesktop')\n }\n >\n {deviceIcons[device]}\n </button>\n ))}\n </div>\n\n {/* Preview Controls */}\n {!isPreviewActive ? (\n <button\n type=\"button\"\n onClick={startPreview}\n disabled={!validationResults?.valid}\n className=\"px-4 py-2 min-h-[44px] bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg/90 disabled:opacity-50\"\n >\n {tr('tourPreview.startPreview')}\n </button>\n ) : (\n <button\n type=\"button\"\n onClick={stopPreview}\n className=\"px-4 py-2 min-h-[44px] border border-border-subtle rounded-md hover:bg-accent flex items-center gap-2\"\n >\n <X size={20} />\n {tr('tourPreview.stopPreview')}\n </button>\n )}\n </div>\n\n {/* Validation Results */}\n {validationResults && !validationResults.valid && (\n <div className=\"bg-status-error-bg/10 border-b border-status-error-border px-3 sm:px-6 py-3\">\n <div className=\"flex items-start gap-3\">\n <AlertCircle className=\"text-status-error-text flex-shrink-0 mt-0.5\" size={20} />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tr('tourPreview.validationErrorsTitle')}\n </h3>\n <ul className=\"list-disc list-inside space-y-1\">\n {validationResults.errors.map((error) => (\n <li key={error} className=\"text-sm text-status-error-text\">\n {error}\n </li>\n ))}\n </ul>\n </div>\n </div>\n </div>\n )}\n\n {/* Warnings */}\n {validationResults && validationResults.warnings.length > 0 && (\n <div className=\"bg-warning/10 border-b border-warning px-3 sm:px-6 py-3\">\n <div className=\"flex items-start gap-3\">\n <AlertCircle className=\"text-warning flex-shrink-0 mt-0.5\" size={20} />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-warning mb-1\">{tr('tourPreview.warningsTitle')}</h3>\n <ul className=\"list-disc list-inside space-y-1\">\n {validationResults.warnings.map((warning) => (\n <li key={warning} className=\"text-sm text-warning\">\n {warning}\n </li>\n ))}\n </ul>\n </div>\n </div>\n </div>\n )}\n\n {/* Preview Area */}\n <div className=\"flex-1 flex items-center justify-center p-3 sm:p-6 overflow-auto\">\n <div\n className={`bg-bg-surface border-2 rounded-lg shadow-xl overflow-hidden ${\n devicePreview === 'mobile'\n ? 'w-[min(375px,calc(100vw-1.5rem))] h-[667px] max-h-full'\n : devicePreview === 'tablet'\n ? 'w-[min(768px,calc(100vw-1.5rem))] h-[1024px] max-h-full'\n : 'w-full max-w-[1920px] h-full max-h-[1080px]'\n }`}\n >\n {isPreviewActive && currentStep ? (\n <div className=\"h-full flex flex-col items-center justify-center p-4 sm:p-8\">\n {/* Simulated Tour Tooltip */}\n <div className=\"max-w-md border border-border-subtle rounded-lg shadow-lg bg-bg-surface p-4 sm:p-6\">\n <h3 className=\"text-lg font-semibold mb-3\">{currentStep.title}</h3>\n <p className=\"text-sm text-text-secondary mb-4 whitespace-pre-wrap\">\n {currentStep.content}\n </p>\n <div className=\"flex gap-2\">\n <button\n type=\"button\"\n onClick={previousStep}\n disabled={!canGoPrevious}\n className=\"px-3 py-2 min-h-[44px] min-w-[44px] border border-border-subtle rounded-md hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed\"\n aria-label={tr('tourPreview.previous')}\n >\n <ChevronLeft size={16} />\n </button>\n <button\n type=\"button\"\n onClick={nextStep}\n disabled={!canGoNext}\n className=\"flex-1 px-3 py-2 min-h-[44px] bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg/90 disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n {canGoNext ? tr('tourPreview.next') : tr('tourPreview.finish')}\n </button>\n </div>\n </div>\n </div>\n ) : (\n <div className=\"h-full flex items-center justify-center text-text-secondary\">\n <div className=\"text-center\">\n <CheckCircle className=\"mx-auto mb-4\" size={48} />\n <p className=\"mb-2\">{tr('tourPreview.readyTitle')}</p>\n <p className=\"text-sm\">{tr('tourPreview.readyHint')}</p>\n </div>\n </div>\n )}\n </div>\n </div>\n\n {/* Footer Controls */}\n {isPreviewActive && (\n <div className=\"border-t border-border-subtle bg-bg-surface p-3 sm:p-4 flex items-center justify-center gap-3 sm:gap-4\">\n <button\n type=\"button\"\n onClick={previousStep}\n disabled={!canGoPrevious}\n className=\"px-4 py-2 min-h-[44px] border border-border-subtle rounded-md hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2\"\n >\n <ChevronLeft size={20} />\n {tr('tourPreview.previous')}\n </button>\n <div className=\"text-sm text-text-secondary\">\n {currentStepIndex + 1} / {totalSteps}\n </div>\n <button\n type=\"button\"\n onClick={nextStep}\n disabled={!canGoNext}\n className=\"px-4 py-2 min-h-[44px] border border-border-subtle rounded-md hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2\"\n >\n {tr('tourPreview.nextFooter')}\n <ChevronRight size={20} />\n </button>\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAyBA,SAAgB,IAAkB;CAChC,IAAM,EAAE,UAAO,GAAc,EACvB,EAAE,cAAW,GAAW,EACxB,IAAW,GAAa,EACxB,EAAE,cAAW,QAAQ,GAAiB,EACtC,EAAE,qBAAkB,GAA0B,EAC9C,IAAc,EAAc,EAAiB,UAAU,EACvD,EAAE,SAAM,gBAAa,EAAe,EAAO,EAC3C,EAAE,qBAAkB,GAAe,EAEnC,EACJ,oBACA,qBACA,gBACA,eACA,cACA,kBACA,sBACA,iBACA,gBACA,aACA,iBACA,iBACA,0BACE,EAAe,KAAQ,KAAA,EAAU;AAcrC,KAZA,QAAgB;AACd,EAAI,KACF,EAAS,EAAO;IAEjB,CAAC,GAAQ,EAAS,CAAC,EAEtB,QAAgB;AACd,EAAI,KACF,GAAoB;IAErB;EAAC;EAAM;EAAe;EAAmB,CAAC,EAEzC,CAAC,EACH,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,MAAD;IAAI,WAAU;cACX,EAAG,gCAAgC;IACjC,CAAA,EACL,kBAAC,KAAD;IAAG,WAAU;cAA+B,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ourcesContent":["import { useEffect } from 'react';\nimport { useParams, useNavigate } from 'react-router-dom';\nimport {\n ArrowLeft,\n ChevronLeft,\n ChevronRight,\n X,\n Smartphone,\n Tablet,\n Monitor,\n CheckCircle,\n AlertCircle,\n} from 'lucide-react';\nimport { Button, GlassCard } from '@burdenoff/fe-libs/ui';\nimport { useTourPreview } from '../hooks/useTourPreview';\nimport { useTourBuilder } from '../hooks/useTourBuilder';\nimport { useToursPermissionAccess } from '../hooks/useToursPermissionAccess';\nimport { useToursContext } from '../providers/ToursProvider';\nimport { useToursStore } from '../store/toursStore';\nimport { TOUR_PERMISSIONS } from '../../constants/permissions';\nimport { useToursI18n } from '../i18n';\n\n/**\n * Tour preview page\n * Preview tour with device simulation and validation\n */\nexport function TourPreviewPage() {\n const { tr } = useToursI18n();\n const { tourId } = useParams();\n const navigate = useNavigate();\n const { basePath = '/' } = useToursContext();\n const { hasPermission } = useToursPermissionAccess();\n const canReadTour = hasPermission(TOUR_PERMISSIONS.TOUR_READ);\n const { tour, loadTour } = useTourBuilder(tourId);\n const { devicePreview } = useToursStore();\n\n const {\n isPreviewActive,\n currentStepIndex,\n currentStep,\n totalSteps,\n canGoNext,\n canGoPrevious,\n validationResults,\n startPreview,\n stopPreview,\n nextStep,\n previousStep,\n changeDevice,\n validateForPreview,\n } = useTourPreview(tour || undefined);\n\n useEffect(() => {\n if (tourId) {\n loadTour(tourId);\n }\n }, [tourId, loadTour]);\n\n useEffect(() => {\n if (tour) {\n validateForPreview();\n }\n }, [tour, devicePreview, validateForPreview]);\n\n if (!canReadTour) {\n return (\n <div className=\"flex items-center justify-center h-screen bg-bg-sunken\">\n <div className=\"text-center\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-2\">\n {tr('tourPreview.accessDeniedTitle')}\n </h2>\n <p className=\"text-sm text-text-secondary\">{tr('tourPreview.accessDeniedMessage')}</p>\n </div>\n </div>\n );\n }\n\n if (!tour) {\n return (\n <div className=\"flex items-center justify-center h-screen bg-bg-sunken\">\n <p className=\"text-text-secondary\">{tr('tourPreview.loading')}</p>\n </div>\n );\n }\n\n const handleBack = () => {\n navigate(`${basePath}/${tourId}/edit`);\n };\n\n const deviceIcons = {\n mobile: <Smartphone size={20} />,\n tablet: <Tablet size={20} />,\n desktop: <Monitor size={20} />,\n };\n\n return (\n <div className=\"flex flex-col h-screen bg-bg-sunken\">\n {/* Header */}\n <div className=\"border-b border-border-subtle bg-bg-surface p-3 sm:p-4 flex flex-wrap items-center gap-3 sm:gap-4\">\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"p-2 min-h-[44px] min-w-[44px] hover:bg-accent rounded-md\"\n aria-label={tr('tourBuilder.goBack')}\n >\n <ArrowLeft size={20} />\n </button>\n <div className=\"flex-1 min-w-[12rem]\">\n <h1 className=\"text-base sm:text-lg font-semibold truncate\">\n {tour?.name} - {tr('tourPreview.previewSuffix')}\n </h1>\n {isPreviewActive && (\n <p className=\"text-sm text-text-secondary\">\n {tr('tourPreview.stepOf')} {currentStepIndex + 1} {tr('tourPreview.stepOfConnector')}{' '}\n {totalSteps}\n </p>\n )}\n </div>\n\n {/* Device Selector */}\n <div className=\"flex gap-2 border border-border-subtle rounded-md overflow-hidden\">\n {(['mobile', 'tablet', 'desktop'] as const).map((device) => (\n <button\n type=\"button\"\n key={device}\n onClick={() => changeDevice(device)}\n className={`px-3 py-2 min-h-[44px] min-w-[44px] ${\n devicePreview === device\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'bg-bg-surface hover:bg-accent'\n }`}\n title={\n device === 'mobile'\n ? tr('tourPreview.deviceMobile')\n : device === 'tablet'\n ? tr('tourPreview.deviceTablet')\n : tr('tourPreview.deviceDesktop')\n }\n aria-label={\n device === 'mobile'\n ? tr('tourPreview.deviceMobile')\n : device === 'tablet'\n ? tr('tourPreview.deviceTablet')\n : tr('tourPreview.deviceDesktop')\n }\n >\n {deviceIcons[device]}\n </button>\n ))}\n </div>\n\n {/* Preview Controls */}\n {!isPreviewActive ? (\n <Button\n type=\"button\"\n onClick={startPreview}\n disabled={!validationResults?.valid}\n className=\"min-h-[44px]\"\n >\n {tr('tourPreview.startPreview')}\n </Button>\n ) : (\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={stopPreview}\n className=\"min-h-[44px]\"\n >\n <X size={20} />\n {tr('tourPreview.stopPreview')}\n </Button>\n )}\n </div>\n\n {/* Validation Results */}\n {validationResults && !validationResults.valid && (\n <div className=\"bg-status-error-bg/10 border-b border-status-error-border px-3 sm:px-6 py-3\">\n <div className=\"flex items-start gap-3\">\n <AlertCircle className=\"text-status-error-text flex-shrink-0 mt-0.5\" size={20} />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tr('tourPreview.validationErrorsTitle')}\n </h3>\n <ul className=\"list-disc list-inside space-y-1\">\n {validationResults.errors.map((error) => (\n <li key={error} className=\"text-sm text-status-error-text\">\n {error}\n </li>\n ))}\n </ul>\n </div>\n </div>\n </div>\n )}\n\n {/* Warnings */}\n {validationResults && validationResults.warnings.length > 0 && (\n <div className=\"bg-warning/10 border-b border-warning px-3 sm:px-6 py-3\">\n <div className=\"flex items-start gap-3\">\n <AlertCircle className=\"text-warning flex-shrink-0 mt-0.5\" size={20} />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-warning mb-1\">{tr('tourPreview.warningsTitle')}</h3>\n <ul className=\"list-disc list-inside space-y-1\">\n {validationResults.warnings.map((warning) => (\n <li key={warning} className=\"text-sm text-warning\">\n {warning}\n </li>\n ))}\n </ul>\n </div>\n </div>\n </div>\n )}\n\n {/* Preview Area */}\n <div className=\"flex-1 flex items-center justify-center p-3 sm:p-6 overflow-auto\">\n <div\n className={`bg-bg-surface border-2 rounded-lg shadow-xl overflow-hidden ${\n devicePreview === 'mobile'\n ? 'w-[min(375px,calc(100vw-1.5rem))] h-[667px] max-h-full'\n : devicePreview === 'tablet'\n ? 'w-[min(768px,calc(100vw-1.5rem))] h-[1024px] max-h-full'\n : 'w-full max-w-[1920px] h-full max-h-[1080px]'\n }`}\n >\n {isPreviewActive && currentStep ? (\n <div className=\"h-full flex flex-col items-center justify-center p-4 sm:p-8\">\n {/* Simulated Tour Tooltip */}\n <GlassCard\n treatment=\"glass\"\n className=\"max-w-md border-border-seam p-4 sm:p-6 shadow-[var(--shadow-pop)]\"\n >\n <h3 className=\"text-lg font-semibold mb-3\">{currentStep.title}</h3>\n <p className=\"text-sm text-text-secondary mb-4 whitespace-pre-wrap\">\n {currentStep.content}\n </p>\n <div className=\"flex gap-2\">\n <button\n type=\"button\"\n onClick={previousStep}\n disabled={!canGoPrevious}\n className=\"px-3 py-2 min-h-[44px] min-w-[44px] border border-border-subtle rounded-md hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed\"\n aria-label={tr('tourPreview.previous')}\n >\n <ChevronLeft size={16} />\n </button>\n <button\n type=\"button\"\n onClick={nextStep}\n disabled={!canGoNext}\n className=\"flex-1 px-3 py-2 min-h-[44px] bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg/90 disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n {canGoNext ? tr('tourPreview.next') : tr('tourPreview.finish')}\n </button>\n </div>\n </GlassCard>\n </div>\n ) : (\n <div className=\"h-full flex items-center justify-center text-text-secondary\">\n <div className=\"text-center\">\n <CheckCircle className=\"mx-auto mb-4\" size={48} />\n <p className=\"mb-2\">{tr('tourPreview.readyTitle')}</p>\n <p className=\"text-sm\">{tr('tourPreview.readyHint')}</p>\n </div>\n </div>\n )}\n </div>\n </div>\n\n {/* Footer Controls */}\n {isPreviewActive && (\n <div className=\"border-t border-border-subtle bg-bg-surface p-3 sm:p-4 flex items-center justify-center gap-3 sm:gap-4\">\n <button\n type=\"button\"\n onClick={previousStep}\n disabled={!canGoPrevious}\n className=\"px-4 py-2 min-h-[44px] border border-border-subtle rounded-md hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2\"\n >\n <ChevronLeft size={20} />\n {tr('tourPreview.previous')}\n </button>\n <div className=\"text-sm text-text-secondary\">\n {currentStepIndex + 1} / {totalSteps}\n </div>\n <button\n type=\"button\"\n onClick={nextStep}\n disabled={!canGoNext}\n className=\"px-4 py-2 min-h-[44px] border border-border-subtle rounded-md hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2\"\n >\n {tr('tourPreview.nextFooter')}\n <ChevronRight size={20} />\n </button>\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA0BA,SAAgB,IAAkB;CAChC,IAAM,EAAE,UAAO,GAAc,EACvB,EAAE,cAAW,GAAW,EACxB,IAAW,GAAa,EACxB,EAAE,cAAW,QAAQ,GAAiB,EACtC,EAAE,qBAAkB,GAA0B,EAC9C,IAAc,EAAc,EAAiB,UAAU,EACvD,EAAE,SAAM,gBAAa,EAAe,EAAO,EAC3C,EAAE,qBAAkB,GAAe,EAEnC,EACJ,oBACA,qBACA,gBACA,eACA,cACA,kBACA,sBACA,iBACA,gBACA,aACA,iBACA,iBACA,0BACE,EAAe,KAAQ,KAAA,EAAU;AAcrC,KAZA,QAAgB;AACd,EAAI,KACF,EAAS,EAAO;IAEjB,CAAC,GAAQ,EAAS,CAAC,EAEtB,QAAgB;AACd,EAAI,KACF,GAAoB;IAErB;EAAC;EAAM;EAAe;EAAmB,CAAC,EAEzC,CAAC,EACH,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,MAAD;IAAI,WAAU;cACX,EAAG,gCAAgC;IACjC,CAAA,EACL,kBAAC,KAAD;IAAG,WAAU;cAA+B,EAAG,kCAAkC;IAAK,CAAA,CAClF;;EACF,CAAA;AAIV,KAAI,CAAC,EACH,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,KAAD;GAAG,WAAU;aAAuB,EAAG,sBAAsB;GAAK,CAAA;EAC9D,CAAA;CAIV,IAAM,UAAmB;AACvB,IAAS,GAAG,EAAS,GAAG,EAAO,OAAO;I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AAU;UACV,cAAY,EAAG,uBAAuB;oBAEtC,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA;UAClB,CAAA,EACT,kBAAC,UAAD;UACE,MAAK;UACL,SAAS;UACT,UAAU,CAAC;UACX,WAAU;oBAEG,EAAZ,IAAe,qBAAyB,qBAAqB;UACvD,CAAA,CACL;;QACI;;MACR,CAAA,GAEN,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,OAAD;OAAK,WAAU;iBAAf;QACE,kBAAC,GAAD;SAAa,WAAU;SAAe,MAAM;SAAM,CAAA;QAClD,kBAAC,KAAD;SAAG,WAAU;mBAAQ,EAAG,yBAAyB;SAAK,CAAA;QACtD,kBAAC,KAAD;SAAG,WAAU;mBAAW,EAAG,wBAAwB;SAAK,CAAA;QACpD;;MACF,CAAA;KAEJ,CAAA;IACF,CAAA;GAGL,KACC,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,UAAD;MACE,MAAK;MACL,SAAS;MACT,UAAU,CAAC;MACX,WAAU;gBAJZ,CAME,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA,EACxB,EAAG,uBAAuB,CACpB;;KACT,kBAAC,OAAD;MAAK,WAAU;gBAAf;OACG,IAAmB;OAAE;OAAI;OACtB;;KACN,kBAAC,UAAD;MACE,MAAK;MACL,SAAS;MACT,UAAU,CAAC;MACX,WAAU;gBAJZ,CAMG,EAAG,yBAAyB,EAC7B,kBAAC,GAAD,EAAc,MAAM,IAAM,CAAA,CACnB;;KACL;;GAEJ"}
@@ -6,322 +6,285 @@ import { useTourLifecycle as i } from "../hooks/useTourLifecycle.js";
6
6
  import { useToursPermissionAccess as a } from "../hooks/useToursPermissionAccess.js";
7
7
  import { TOUR_PERMISSIONS as o } from "../../constants/permissions.js";
8
8
  import { useToursI18n as s } from "../i18n.js";
9
- import { isNative as c, nativeConfirm as l, nativeImpact as u, nativeNotify as d, nativeToast as f } from "../../utils/nativeBridge.js";
10
- import { useEffect as p, useRef as m, useState as h } from "react";
11
- import { PermissionGate as g } from "@burdenoff/fe-libs/shared/components";
12
- import { Eye as _, Grid as v, List as ee, ListOrdered as te, MoreVertical as ne, Plus as re, Search as y, Settings as b } from "lucide-react";
13
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
14
- import { useNavigate as C } from "react-router-dom";
9
+ import { isNative as c, nativeConfirm as ee, nativeImpact as l, nativeNotify as u, nativeToast as d } from "../../utils/nativeBridge.js";
10
+ import { useEffect as f, useState as p } from "react";
11
+ import { PermissionGate as m } from "@burdenoff/fe-libs/shared/components";
12
+ import { Eye as h, Grid as g, List as _, ListOrdered as v, Plus as y, Search as b, Settings as x } from "lucide-react";
13
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
14
+ import { useNavigate as w } from "react-router-dom";
15
+ import { AuroraBackground as T, Button as E, CTAOverflowMenu as D, GlassCard as O, GradientText as k, IllustratedEmptyState as A } from "@burdenoff/fe-libs/ui";
15
16
  //#region src/tours/pages/ToursListPage.tsx
16
- function w() {
17
- let { tr: w } = s(), T = C(), { basePath: E = "/" } = e(), { viewMode: D, tourFilter: O, toursListRevision: k, setViewMode: A, updateTourFilter: j, notifyToursListChanged: M } = t(), { hasPermission: N, isLoading: P } = a(), F = N(o.TOUR_UPDATE), I = N(o.TOUR_STEP_UPDATE), L = N(o.TOUR_READ), R = N(o.TOUR_DELETE), z = N(o.TOUR_PUBLISH), B = N(o.TOUR_ARCHIVE), V = N(o.TOUR_DUPLICATE), { tours: H, loading: U, fetchTours: W } = r(), { publishTour: G, unpublishTour: ie, archiveTour: K, duplicateTour: q } = i(), [J] = n(), [Y, ae] = h(""), [oe, se] = h("all"), [X, Z] = h(null), Q = m(null);
18
- p(() => {
19
- P || W({ ...O });
17
+ function j() {
18
+ let { tr: j } = s(), M = w(), { basePath: N = "/" } = e(), { viewMode: P, tourFilter: F, toursListRevision: I, setViewMode: L, updateTourFilter: R, notifyToursListChanged: z } = t(), { hasPermission: B, isLoading: V } = a(), H = B(o.TOUR_UPDATE), U = B(o.TOUR_STEP_UPDATE), W = B(o.TOUR_READ), G = B(o.TOUR_DELETE), K = B(o.TOUR_PUBLISH), te = B(o.TOUR_ARCHIVE), q = B(o.TOUR_DUPLICATE), { tours: J, loading: Y, fetchTours: X } = r(), { publishTour: Z, unpublishTour: Q, archiveTour: ne, duplicateTour: re } = i(), [ie] = n(), [ae, oe] = p(""), [se, ce] = p("all");
19
+ f(() => {
20
+ V || X({ ...F });
20
21
  }, [
21
- W,
22
- O,
23
- k,
24
- P
22
+ X,
23
+ F,
24
+ I,
25
+ V
25
26
  ]);
26
- let ce = (e) => {
27
- ae(e), j({ search: e });
28
- }, le = (e) => {
29
- se(e), j({ status: e });
30
- }, ue = () => {
31
- T(E.endsWith("/") ? `${E}new` : `${E}/new`);
32
- }, $ = (e) => {
27
+ let le = (e) => {
28
+ oe(e), R({ search: e });
29
+ }, ue = (e) => {
30
+ ce(e), R({ status: e });
31
+ }, $ = () => {
32
+ M(N.endsWith("/") ? `${N}new` : `${N}/new`);
33
+ }, de = (e) => {
33
34
  switch (e) {
34
- case "DRAFT": return w("toursList.statusDraft");
35
- case "PUBLISHED": return w("toursList.statusPublished");
36
- case "ARCHIVED": return w("toursList.statusArchived");
37
- case "SCHEDULED": return w("toursList.statusScheduled");
38
- }
39
- }, de = async (e) => {
40
- Z(null), u("light");
41
- try {
42
- await G(e), d("success");
43
- } catch {
44
- d("error"), c() ? f(w("toursList.errorPublish")) : alert(w("toursList.errorPublish"));
35
+ case "DRAFT": return j("toursList.statusDraft");
36
+ case "PUBLISHED": return j("toursList.statusPublished");
37
+ case "ARCHIVED": return j("toursList.statusArchived");
38
+ case "SCHEDULED": return j("toursList.statusScheduled");
45
39
  }
46
40
  }, fe = async (e) => {
47
- Z(null), u("light");
41
+ l("light");
48
42
  try {
49
- await ie(e), d("success");
43
+ await Z(e), u("success");
50
44
  } catch {
51
- d("error"), c() ? f(w("toursList.errorUnpublish")) : alert(w("toursList.errorUnpublish"));
45
+ u("error"), c() ? d(j("toursList.errorPublish")) : alert(j("toursList.errorPublish"));
52
46
  }
53
47
  }, pe = async (e) => {
54
- Z(null), u("light");
48
+ l("light");
55
49
  try {
56
- await K(e), d("success");
50
+ await Q(e), u("success");
57
51
  } catch {
58
- d("error"), c() ? f(w("toursList.errorArchive")) : alert(w("toursList.errorArchive"));
52
+ u("error"), c() ? d(j("toursList.errorUnpublish")) : alert(j("toursList.errorUnpublish"));
59
53
  }
60
54
  }, me = async (e) => {
61
- Z(null), u("light");
55
+ l("light");
62
56
  try {
63
- await q(e), d("success");
57
+ await ne(e), u("success");
64
58
  } catch {
65
- d("error"), c() ? f(w("toursList.errorDuplicate")) : alert(w("toursList.errorDuplicate"));
59
+ u("error"), c() ? d(j("toursList.errorArchive")) : alert(j("toursList.errorArchive"));
66
60
  }
67
61
  }, he = async (e) => {
68
- Z(null), u("medium");
69
- let t = w("toursList.confirmDelete"), n = await l({
70
- title: w("toursList.actionDelete"),
62
+ l("light");
63
+ try {
64
+ await re(e), u("success");
65
+ } catch {
66
+ u("error"), c() ? d(j("toursList.errorDuplicate")) : alert(j("toursList.errorDuplicate"));
67
+ }
68
+ }, ge = async (e) => {
69
+ l("medium");
70
+ let t = j("toursList.confirmDelete"), n = await ee({
71
+ title: j("toursList.actionDelete"),
71
72
  message: t,
72
- okButtonTitle: w("toursList.actionDelete")
73
+ okButtonTitle: j("toursList.actionDelete")
73
74
  });
74
75
  if (n === null ? window.confirm(t) : n) try {
75
- await J({ variables: { id: e } }), M(), d("success");
76
+ await ie({ variables: { id: e } }), z(), u("success");
76
77
  } catch {
77
- d("error"), c() ? f(w("toursList.errorDelete")) : alert(w("toursList.errorDelete"));
78
+ u("error"), c() ? d(j("toursList.errorDelete")) : alert(j("toursList.errorDelete"));
78
79
  }
79
80
  };
80
- return p(() => {
81
- let e = (e) => {
82
- Q.current && !Q.current.contains(e.target) && Z(null);
83
- };
84
- return X && document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
85
- }, [X]), /* @__PURE__ */ S("div", {
81
+ return /* @__PURE__ */ C("div", {
86
82
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
87
83
  children: [
88
- /* @__PURE__ */ S("div", {
89
- className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",
90
- children: [/* @__PURE__ */ S("div", {
91
- className: "flex-1 min-w-0",
92
- children: [/* @__PURE__ */ x("h1", {
93
- className: "text-xl sm:text-2xl font-bold text-text-primary",
94
- children: w("toursList.title")
95
- }), /* @__PURE__ */ x("p", {
96
- className: "text-sm sm:text-base text-text-secondary",
97
- children: w("toursList.subtitle")
84
+ /* @__PURE__ */ C("div", {
85
+ className: "relative overflow-hidden rounded-xl",
86
+ children: [/* @__PURE__ */ S(T, { intensity: "subtle" }), /* @__PURE__ */ C("div", {
87
+ className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 p-1 sm:p-2",
88
+ children: [/* @__PURE__ */ C("div", {
89
+ className: "flex-1 min-w-0",
90
+ children: [/* @__PURE__ */ S("h1", {
91
+ className: "text-xl sm:text-2xl font-bold text-text-primary",
92
+ children: /* @__PURE__ */ S(k, { children: j("toursList.title") })
93
+ }), /* @__PURE__ */ S("p", {
94
+ className: "text-sm sm:text-base text-text-secondary",
95
+ children: j("toursList.subtitle")
96
+ })]
97
+ }), /* @__PURE__ */ S(m, {
98
+ permission: o.TOUR_CREATE,
99
+ children: /* @__PURE__ */ C(E, {
100
+ type: "button",
101
+ onClick: $,
102
+ className: "w-full sm:w-auto min-h-[44px]",
103
+ children: [/* @__PURE__ */ S(y, { size: 20 }), j("toursList.createTour")]
104
+ })
98
105
  })]
99
- }), /* @__PURE__ */ x(g, {
100
- permission: o.TOUR_CREATE,
101
- children: /* @__PURE__ */ S("button", {
102
- type: "button",
103
- onClick: ue,
104
- className: "w-full sm:w-auto px-4 py-2 min-h-[44px] bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg/90 active:bg-action-primary-bg/80 flex items-center justify-center gap-2",
105
- children: [/* @__PURE__ */ x(re, { size: 20 }), w("toursList.createTour")]
106
- })
107
106
  })]
108
107
  }),
109
- /* @__PURE__ */ S("div", {
108
+ /* @__PURE__ */ C("div", {
110
109
  className: "flex flex-col sm:flex-row gap-3 sm:gap-4",
111
- children: [/* @__PURE__ */ S("div", {
110
+ children: [/* @__PURE__ */ C("div", {
112
111
  className: "flex-1 relative",
113
- children: [/* @__PURE__ */ x(y, {
112
+ children: [/* @__PURE__ */ S(b, {
114
113
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",
115
114
  size: 20
116
- }), /* @__PURE__ */ x("input", {
115
+ }), /* @__PURE__ */ S("input", {
117
116
  type: "text",
118
- placeholder: w("toursList.searchPlaceholder"),
119
- value: Y,
120
- onChange: (e) => ce(e.target.value),
117
+ placeholder: j("toursList.searchPlaceholder"),
118
+ value: ae,
119
+ onChange: (e) => le(e.target.value),
121
120
  className: "w-full pl-[3.25rem] pr-4 py-2 min-h-[44px] border border-border-subtle rounded-md bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
122
- "aria-label": w("toursList.searchPlaceholder")
121
+ "aria-label": j("toursList.searchPlaceholder")
123
122
  })]
124
- }), /* @__PURE__ */ S("div", {
123
+ }), /* @__PURE__ */ C("div", {
125
124
  className: "flex gap-2",
126
- children: [/* @__PURE__ */ S("select", {
127
- value: oe,
128
- onChange: (e) => le(e.target.value),
125
+ children: [/* @__PURE__ */ C("select", {
126
+ value: se,
127
+ onChange: (e) => ue(e.target.value),
129
128
  className: "px-4 py-2 min-h-[44px] border border-border-subtle rounded-md bg-bg-surface text-text-primary",
130
- "aria-label": w("toursList.statusAll"),
129
+ "aria-label": j("toursList.statusAll"),
131
130
  children: [
132
- /* @__PURE__ */ x("option", {
131
+ /* @__PURE__ */ S("option", {
133
132
  value: "all",
134
- children: w("toursList.statusAll")
133
+ children: j("toursList.statusAll")
135
134
  }),
136
- /* @__PURE__ */ x("option", {
135
+ /* @__PURE__ */ S("option", {
137
136
  value: "DRAFT",
138
- children: w("toursList.statusDraft")
137
+ children: j("toursList.statusDraft")
139
138
  }),
140
- /* @__PURE__ */ x("option", {
139
+ /* @__PURE__ */ S("option", {
141
140
  value: "PUBLISHED",
142
- children: w("toursList.statusPublished")
141
+ children: j("toursList.statusPublished")
143
142
  }),
144
- /* @__PURE__ */ x("option", {
143
+ /* @__PURE__ */ S("option", {
145
144
  value: "ARCHIVED",
146
- children: w("toursList.statusArchived")
145
+ children: j("toursList.statusArchived")
147
146
  }),
148
- /* @__PURE__ */ x("option", {
147
+ /* @__PURE__ */ S("option", {
149
148
  value: "SCHEDULED",
150
- children: w("toursList.statusScheduled")
149
+ children: j("toursList.statusScheduled")
151
150
  })
152
151
  ]
153
- }), /* @__PURE__ */ S("div", {
152
+ }), /* @__PURE__ */ C("div", {
154
153
  className: "flex border border-border-subtle rounded-md overflow-hidden",
155
- children: [/* @__PURE__ */ x("button", {
154
+ children: [/* @__PURE__ */ S("button", {
156
155
  type: "button",
157
- onClick: () => A("grid"),
158
- className: `px-3 py-2 min-h-[44px] ${D === "grid" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-surface text-text-primary hover:bg-accent"}`,
159
- "aria-label": w("toursList.gridView"),
160
- title: w("toursList.gridView"),
161
- children: /* @__PURE__ */ x(v, { size: 20 })
162
- }), /* @__PURE__ */ x("button", {
156
+ onClick: () => L("grid"),
157
+ className: `px-3 py-2 min-h-[44px] ${P === "grid" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-surface text-text-primary hover:bg-accent"}`,
158
+ "aria-label": j("toursList.gridView"),
159
+ title: j("toursList.gridView"),
160
+ children: /* @__PURE__ */ S(g, { size: 20 })
161
+ }), /* @__PURE__ */ S("button", {
163
162
  type: "button",
164
- onClick: () => A("list"),
165
- className: `px-3 py-2 min-h-[44px] ${D === "list" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-surface text-text-primary hover:bg-accent"}`,
166
- "aria-label": w("toursList.listView"),
167
- title: w("toursList.listView"),
168
- children: /* @__PURE__ */ x(ee, { size: 20 })
163
+ onClick: () => L("list"),
164
+ className: `px-3 py-2 min-h-[44px] ${P === "list" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-surface text-text-primary hover:bg-accent"}`,
165
+ "aria-label": j("toursList.listView"),
166
+ title: j("toursList.listView"),
167
+ children: /* @__PURE__ */ S(_, { size: 20 })
169
168
  })]
170
169
  })]
171
170
  })]
172
171
  }),
173
- U ? /* @__PURE__ */ x("div", {
172
+ Y ? /* @__PURE__ */ S("div", {
174
173
  className: "text-center py-12",
175
- children: /* @__PURE__ */ x("p", {
174
+ children: /* @__PURE__ */ S("p", {
176
175
  className: "text-sm sm:text-base text-text-secondary",
177
- children: w("toursList.loading")
176
+ children: j("toursList.loading")
178
177
  })
179
- }) : H.length > 0 ? /* @__PURE__ */ x("div", {
180
- className: D === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4" : "space-y-3",
181
- children: H.map((e) => {
182
- let t = e.status, n = t === "DRAFT" && z, r = t === "PUBLISHED" && z, i = t !== "ARCHIVED" && B, a = n || r || V || i || R;
183
- return /* @__PURE__ */ S("div", {
184
- className: "border border-border-subtle rounded-md p-4 bg-bg-surface hover:shadow-md transition-shadow",
178
+ }) : J.length > 0 ? /* @__PURE__ */ S("div", {
179
+ className: P === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4" : "space-y-3",
180
+ children: J.map((e) => {
181
+ let t = e.status, n = t === "DRAFT" && K, r = t === "PUBLISHED" && K, i = t !== "ARCHIVED" && te, a = [];
182
+ return n && a.push({
183
+ label: j("toursList.actionPublish"),
184
+ onSelect: () => void fe(e.id)
185
+ }), r && a.push({
186
+ label: j("toursList.actionUnpublish"),
187
+ onSelect: () => void pe(e.id)
188
+ }), q && a.push({
189
+ label: j("toursList.actionDuplicate"),
190
+ onSelect: () => void he(e.id)
191
+ }), i && a.push({
192
+ label: j("toursList.actionArchive"),
193
+ onSelect: () => void me(e.id)
194
+ }), G && a.push({
195
+ label: j("toursList.actionDelete"),
196
+ onSelect: () => void ge(e.id),
197
+ intent: "destructive"
198
+ }), /* @__PURE__ */ C(O, {
199
+ treatment: "plain",
200
+ className: "p-4 border-border-seam shadow-[var(--shadow-pop)]",
185
201
  children: [
186
- /* @__PURE__ */ S("div", {
202
+ /* @__PURE__ */ C("div", {
187
203
  className: "flex items-start justify-between mb-2",
188
- children: [/* @__PURE__ */ x("h3", {
204
+ children: [/* @__PURE__ */ S("h3", {
189
205
  className: "font-semibold text-text-primary",
190
- children: F ? /* @__PURE__ */ x("button", {
206
+ children: H ? /* @__PURE__ */ S("button", {
191
207
  type: "button",
192
208
  className: "cursor-pointer hover:text-primary bg-transparent border-0 p-0 text-left font-inherit",
193
- onClick: () => T(`${E}/${e.id}/edit`),
209
+ onClick: () => M(`${N}/${e.id}/edit`),
194
210
  children: e.name
195
211
  }) : e.name
196
- }), /* @__PURE__ */ x("span", {
197
- className: `px-2 py-1 text-xs rounded-full ${e.status === "PUBLISHED" ? "bg-success/10 text-success" : e.status === "DRAFT" ? "bg-bg-sunken text-text-secondary" : "bg-warning/10 text-warning"}`,
198
- children: $(t)
212
+ }), /* @__PURE__ */ S("span", {
213
+ className: `px-2 py-1 text-xs rounded-full ${e.status === "PUBLISHED" ? "bg-success/10 text-success motion-safe:animate-vc-glow-pulse" : e.status === "DRAFT" ? "bg-bg-sunken text-text-secondary" : "bg-warning/10 text-warning"}`,
214
+ children: de(t)
199
215
  })]
200
216
  }),
201
- e.description && /* @__PURE__ */ x("p", {
217
+ e.description && /* @__PURE__ */ S("p", {
202
218
  className: "text-sm text-text-secondary mb-3",
203
219
  children: e.description
204
220
  }),
205
- /* @__PURE__ */ S("div", {
221
+ /* @__PURE__ */ C("div", {
206
222
  className: "flex items-center justify-between text-xs text-text-secondary mb-3",
207
- children: [/* @__PURE__ */ S("span", { children: [
223
+ children: [/* @__PURE__ */ C("span", { children: [
208
224
  e.steps?.length || 0,
209
225
  " ",
210
- w("toursList.steps")
211
- ] }), /* @__PURE__ */ S("span", { children: [
226
+ j("toursList.steps")
227
+ ] }), /* @__PURE__ */ C("span", { children: [
212
228
  e.viewCount,
213
229
  " ",
214
- w("toursList.views")
230
+ j("toursList.views")
215
231
  ] })]
216
232
  }),
217
- /* @__PURE__ */ S("div", {
218
- className: "flex flex-wrap items-center gap-2 pt-3 border-t border-border-subtle",
233
+ /* @__PURE__ */ C("div", {
234
+ className: "flex flex-wrap items-center gap-2 pt-3 border-t border-border-seam",
219
235
  children: [
220
- I && /* @__PURE__ */ S("button", {
236
+ U && /* @__PURE__ */ C("button", {
221
237
  type: "button",
222
238
  onClick: (t) => {
223
- t.stopPropagation(), T(`${E}/${e.id}/steps`);
239
+ t.stopPropagation(), M(`${N}/${e.id}/steps`);
224
240
  },
225
241
  className: "flex-1 min-w-[6.5rem] px-3 py-2 min-h-[44px] text-xs bg-secondary text-secondary-foreground rounded hover:bg-secondary/80 flex items-center justify-center gap-1.5",
226
- title: w("toursList.editStepsTitle"),
227
- children: [/* @__PURE__ */ x(te, { size: 14 }), w("toursList.stepsButton")]
242
+ title: j("toursList.editStepsTitle"),
243
+ children: [/* @__PURE__ */ S(v, { size: 14 }), j("toursList.stepsButton")]
228
244
  }),
229
- L && /* @__PURE__ */ S("button", {
245
+ W && /* @__PURE__ */ C("button", {
230
246
  type: "button",
231
247
  onClick: (t) => {
232
- t.stopPropagation(), T(`${E}/${e.id}/preview`);
248
+ t.stopPropagation(), M(`${N}/${e.id}/preview`);
233
249
  },
234
- className: "flex-1 min-w-[6.5rem] px-3 py-2 min-h-[44px] text-xs border border-border-subtle rounded hover:bg-accent flex items-center justify-center gap-1.5",
235
- title: w("toursList.previewTitle"),
236
- children: [/* @__PURE__ */ x(_, { size: 14 }), w("toursList.previewButton")]
250
+ className: "flex-1 min-w-[6.5rem] px-3 py-2 min-h-[44px] text-xs border border-border-seam rounded hover:bg-accent flex items-center justify-center gap-1.5",
251
+ title: j("toursList.previewTitle"),
252
+ children: [/* @__PURE__ */ S(h, { size: 14 }), j("toursList.previewButton")]
237
253
  }),
238
- F && /* @__PURE__ */ x("button", {
254
+ H && /* @__PURE__ */ S("button", {
239
255
  type: "button",
240
256
  onClick: (t) => {
241
- t.stopPropagation(), T(`${E}/${e.id}/edit`);
257
+ t.stopPropagation(), M(`${N}/${e.id}/edit`);
242
258
  },
243
- className: "p-2 min-h-[44px] min-w-[44px] text-xs border border-border-subtle rounded hover:bg-accent",
244
- title: w("toursList.settingsTitle"),
245
- "aria-label": w("toursList.settingsTitle"),
246
- children: /* @__PURE__ */ x(b, { size: 14 })
259
+ className: "p-2 min-h-[44px] min-w-[44px] text-xs border border-border-seam rounded hover:bg-accent",
260
+ title: j("toursList.settingsTitle"),
261
+ "aria-label": j("toursList.settingsTitle"),
262
+ children: /* @__PURE__ */ S(x, { size: 14 })
247
263
  }),
248
- a && /* @__PURE__ */ S("div", {
249
- className: "relative",
250
- ref: X === e.id ? Q : void 0,
251
- children: [/* @__PURE__ */ x("button", {
252
- type: "button",
253
- onClick: (t) => {
254
- t.stopPropagation(), Z(X === e.id ? null : e.id);
255
- },
256
- className: "p-2 min-h-[44px] min-w-[44px] text-xs border border-border-subtle rounded hover:bg-accent",
257
- title: w("toursList.moreActionsTitle"),
258
- "aria-label": w("toursList.moreActionsTitle"),
259
- children: /* @__PURE__ */ x(ne, { size: 14 })
260
- }), X === e.id && /* @__PURE__ */ S("div", {
261
- className: "absolute right-0 top-full mt-1 w-40 bg-bg-surface border border-border-subtle rounded-md shadow-lg z-10",
262
- children: [
263
- n && /* @__PURE__ */ x("button", {
264
- type: "button",
265
- onClick: (t) => {
266
- t.stopPropagation(), de(e.id);
267
- },
268
- className: "w-full text-left px-3 py-2 min-h-[44px] text-xs hover:bg-accent",
269
- children: w("toursList.actionPublish")
270
- }),
271
- r && /* @__PURE__ */ x("button", {
272
- type: "button",
273
- onClick: (t) => {
274
- t.stopPropagation(), fe(e.id);
275
- },
276
- className: "w-full text-left px-3 py-2 min-h-[44px] text-xs hover:bg-accent",
277
- children: w("toursList.actionUnpublish")
278
- }),
279
- V && /* @__PURE__ */ x("button", {
280
- type: "button",
281
- onClick: (t) => {
282
- t.stopPropagation(), me(e.id);
283
- },
284
- className: "w-full text-left px-3 py-2 min-h-[44px] text-xs hover:bg-accent",
285
- children: w("toursList.actionDuplicate")
286
- }),
287
- i && /* @__PURE__ */ x("button", {
288
- type: "button",
289
- onClick: (t) => {
290
- t.stopPropagation(), pe(e.id);
291
- },
292
- className: "w-full text-left px-3 py-2 min-h-[44px] text-xs hover:bg-accent",
293
- children: w("toursList.actionArchive")
294
- }),
295
- R && /* @__PURE__ */ x("button", {
296
- type: "button",
297
- onClick: (t) => {
298
- t.stopPropagation(), he(e.id);
299
- },
300
- className: "w-full text-left px-3 py-2 min-h-[44px] text-xs text-status-error-text hover:bg-status-error-bg/10",
301
- children: w("toursList.actionDelete")
302
- })
303
- ]
304
- })]
305
- })
264
+ a.length > 0 && /* @__PURE__ */ S(D, { actions: a })
306
265
  ]
307
266
  })
308
267
  ]
309
268
  }, e.id);
310
269
  })
311
- }) : /* @__PURE__ */ S("div", {
312
- className: "text-center py-12 border border-dashed border-border-subtle rounded-md",
313
- children: [/* @__PURE__ */ x("p", {
314
- className: "text-sm sm:text-base text-text-secondary mb-2",
315
- children: w("toursList.emptyTitle")
316
- }), /* @__PURE__ */ x("p", {
317
- className: "text-xs sm:text-sm text-text-secondary",
318
- children: w("toursList.emptySubtitle")
319
- })]
270
+ }) : /* @__PURE__ */ S(A, {
271
+ illustration: "onboarding",
272
+ title: j("toursList.emptyTitle"),
273
+ description: j("toursList.emptySubtitle"),
274
+ action: /* @__PURE__ */ S(m, {
275
+ permission: o.TOUR_CREATE,
276
+ children: /* @__PURE__ */ C(E, {
277
+ type: "button",
278
+ onClick: $,
279
+ className: "min-h-[44px]",
280
+ children: [/* @__PURE__ */ S(y, { size: 20 }), j("toursList.createTour")]
281
+ })
282
+ })
320
283
  })
321
284
  ]
322
285
  });
323
286
  }
324
287
  //#endregion
325
- export { w as ToursListPage };
288
+ export { j as ToursListPage };
326
289
 
327
290
  //# sourceMappingURL=ToursListPage.js.map