@burdenoff/microfe-tours 2026.624.1 → 2026.625.1

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"}
@@ -7,321 +7,277 @@ import { useToursPermissionAccess as a } from "../hooks/useToursPermissionAccess
7
7
  import { TOUR_PERMISSIONS as o } from "../../constants/permissions.js";
8
8
  import { useToursI18n as s } from "../i18n.js";
9
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";
10
+ import { useEffect as p, useState as m } from "react";
11
+ import { PermissionGate as h } from "@burdenoff/fe-libs/shared/components";
12
+ import { Eye as g, Grid as _, List as v, ListOrdered as y, Plus as b, Search as x, Settings as S } from "lucide-react";
13
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
14
+ import { useNavigate as T } from "react-router-dom";
15
+ import { Button as E, CTAOverflowMenu as D, GlassCard as O } 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);
17
+ function k() {
18
+ let { tr: k } = s(), A = T(), { basePath: j = "/" } = e(), { viewMode: M, tourFilter: N, toursListRevision: P, setViewMode: F, updateTourFilter: I, notifyToursListChanged: L } = t(), { hasPermission: R, isLoading: z } = a(), B = R(o.TOUR_UPDATE), V = R(o.TOUR_STEP_UPDATE), H = R(o.TOUR_READ), U = R(o.TOUR_DELETE), W = R(o.TOUR_PUBLISH), G = R(o.TOUR_ARCHIVE), K = R(o.TOUR_DUPLICATE), { tours: q, loading: ee, fetchTours: J } = r(), { publishTour: Y, unpublishTour: X, archiveTour: Z, duplicateTour: Q } = i(), [$] = n(), [te, ne] = m(""), [re, ie] = m("all");
18
19
  p(() => {
19
- P || W({ ...O });
20
+ z || J({ ...N });
20
21
  }, [
21
- W,
22
- O,
23
- k,
24
- P
22
+ J,
23
+ N,
24
+ P,
25
+ z
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 ae = (e) => {
28
+ ne(e), I({ search: e });
29
+ }, oe = (e) => {
30
+ ie(e), I({ status: e });
31
+ }, se = () => {
32
+ A(j.endsWith("/") ? `${j}new` : `${j}/new`);
33
+ }, ce = (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");
35
+ case "DRAFT": return k("toursList.statusDraft");
36
+ case "PUBLISHED": return k("toursList.statusPublished");
37
+ case "ARCHIVED": return k("toursList.statusArchived");
38
+ case "SCHEDULED": return k("toursList.statusScheduled");
38
39
  }
39
- }, de = async (e) => {
40
- Z(null), u("light");
40
+ }, le = async (e) => {
41
+ u("light");
41
42
  try {
42
- await G(e), d("success");
43
+ await Y(e), d("success");
43
44
  } catch {
44
- d("error"), c() ? f(w("toursList.errorPublish")) : alert(w("toursList.errorPublish"));
45
+ d("error"), c() ? f(k("toursList.errorPublish")) : alert(k("toursList.errorPublish"));
45
46
  }
46
- }, fe = async (e) => {
47
- Z(null), u("light");
47
+ }, ue = async (e) => {
48
+ u("light");
48
49
  try {
49
- await ie(e), d("success");
50
+ await X(e), d("success");
50
51
  } catch {
51
- d("error"), c() ? f(w("toursList.errorUnpublish")) : alert(w("toursList.errorUnpublish"));
52
+ d("error"), c() ? f(k("toursList.errorUnpublish")) : alert(k("toursList.errorUnpublish"));
52
53
  }
53
- }, pe = async (e) => {
54
- Z(null), u("light");
54
+ }, de = async (e) => {
55
+ u("light");
55
56
  try {
56
- await K(e), d("success");
57
+ await Z(e), d("success");
57
58
  } catch {
58
- d("error"), c() ? f(w("toursList.errorArchive")) : alert(w("toursList.errorArchive"));
59
+ d("error"), c() ? f(k("toursList.errorArchive")) : alert(k("toursList.errorArchive"));
59
60
  }
60
- }, me = async (e) => {
61
- Z(null), u("light");
61
+ }, fe = async (e) => {
62
+ u("light");
62
63
  try {
63
- await q(e), d("success");
64
+ await Q(e), d("success");
64
65
  } catch {
65
- d("error"), c() ? f(w("toursList.errorDuplicate")) : alert(w("toursList.errorDuplicate"));
66
+ d("error"), c() ? f(k("toursList.errorDuplicate")) : alert(k("toursList.errorDuplicate"));
66
67
  }
67
- }, he = async (e) => {
68
- Z(null), u("medium");
69
- let t = w("toursList.confirmDelete"), n = await l({
70
- title: w("toursList.actionDelete"),
68
+ }, pe = async (e) => {
69
+ u("medium");
70
+ let t = k("toursList.confirmDelete"), n = await l({
71
+ title: k("toursList.actionDelete"),
71
72
  message: t,
72
- okButtonTitle: w("toursList.actionDelete")
73
+ okButtonTitle: k("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 $({ variables: { id: e } }), L(), d("success");
76
77
  } catch {
77
- d("error"), c() ? f(w("toursList.errorDelete")) : alert(w("toursList.errorDelete"));
78
+ d("error"), c() ? f(k("toursList.errorDelete")) : alert(k("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__ */ w("div", {
86
82
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
87
83
  children: [
88
- /* @__PURE__ */ S("div", {
84
+ /* @__PURE__ */ w("div", {
89
85
  className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",
90
- children: [/* @__PURE__ */ S("div", {
86
+ children: [/* @__PURE__ */ w("div", {
91
87
  className: "flex-1 min-w-0",
92
- children: [/* @__PURE__ */ x("h1", {
88
+ children: [/* @__PURE__ */ C("h1", {
93
89
  className: "text-xl sm:text-2xl font-bold text-text-primary",
94
- children: w("toursList.title")
95
- }), /* @__PURE__ */ x("p", {
90
+ children: k("toursList.title")
91
+ }), /* @__PURE__ */ C("p", {
96
92
  className: "text-sm sm:text-base text-text-secondary",
97
- children: w("toursList.subtitle")
93
+ children: k("toursList.subtitle")
98
94
  })]
99
- }), /* @__PURE__ */ x(g, {
95
+ }), /* @__PURE__ */ C(h, {
100
96
  permission: o.TOUR_CREATE,
101
- children: /* @__PURE__ */ S("button", {
97
+ children: /* @__PURE__ */ w(E, {
102
98
  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")]
99
+ onClick: se,
100
+ className: "w-full sm:w-auto min-h-[44px]",
101
+ children: [/* @__PURE__ */ C(b, { size: 20 }), k("toursList.createTour")]
106
102
  })
107
103
  })]
108
104
  }),
109
- /* @__PURE__ */ S("div", {
105
+ /* @__PURE__ */ w("div", {
110
106
  className: "flex flex-col sm:flex-row gap-3 sm:gap-4",
111
- children: [/* @__PURE__ */ S("div", {
107
+ children: [/* @__PURE__ */ w("div", {
112
108
  className: "flex-1 relative",
113
- children: [/* @__PURE__ */ x(y, {
109
+ children: [/* @__PURE__ */ C(x, {
114
110
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",
115
111
  size: 20
116
- }), /* @__PURE__ */ x("input", {
112
+ }), /* @__PURE__ */ C("input", {
117
113
  type: "text",
118
- placeholder: w("toursList.searchPlaceholder"),
119
- value: Y,
120
- onChange: (e) => ce(e.target.value),
114
+ placeholder: k("toursList.searchPlaceholder"),
115
+ value: te,
116
+ onChange: (e) => ae(e.target.value),
121
117
  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")
118
+ "aria-label": k("toursList.searchPlaceholder")
123
119
  })]
124
- }), /* @__PURE__ */ S("div", {
120
+ }), /* @__PURE__ */ w("div", {
125
121
  className: "flex gap-2",
126
- children: [/* @__PURE__ */ S("select", {
127
- value: oe,
128
- onChange: (e) => le(e.target.value),
122
+ children: [/* @__PURE__ */ w("select", {
123
+ value: re,
124
+ onChange: (e) => oe(e.target.value),
129
125
  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"),
126
+ "aria-label": k("toursList.statusAll"),
131
127
  children: [
132
- /* @__PURE__ */ x("option", {
128
+ /* @__PURE__ */ C("option", {
133
129
  value: "all",
134
- children: w("toursList.statusAll")
130
+ children: k("toursList.statusAll")
135
131
  }),
136
- /* @__PURE__ */ x("option", {
132
+ /* @__PURE__ */ C("option", {
137
133
  value: "DRAFT",
138
- children: w("toursList.statusDraft")
134
+ children: k("toursList.statusDraft")
139
135
  }),
140
- /* @__PURE__ */ x("option", {
136
+ /* @__PURE__ */ C("option", {
141
137
  value: "PUBLISHED",
142
- children: w("toursList.statusPublished")
138
+ children: k("toursList.statusPublished")
143
139
  }),
144
- /* @__PURE__ */ x("option", {
140
+ /* @__PURE__ */ C("option", {
145
141
  value: "ARCHIVED",
146
- children: w("toursList.statusArchived")
142
+ children: k("toursList.statusArchived")
147
143
  }),
148
- /* @__PURE__ */ x("option", {
144
+ /* @__PURE__ */ C("option", {
149
145
  value: "SCHEDULED",
150
- children: w("toursList.statusScheduled")
146
+ children: k("toursList.statusScheduled")
151
147
  })
152
148
  ]
153
- }), /* @__PURE__ */ S("div", {
149
+ }), /* @__PURE__ */ w("div", {
154
150
  className: "flex border border-border-subtle rounded-md overflow-hidden",
155
- children: [/* @__PURE__ */ x("button", {
151
+ children: [/* @__PURE__ */ C("button", {
156
152
  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", {
153
+ onClick: () => F("grid"),
154
+ className: `px-3 py-2 min-h-[44px] ${M === "grid" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-surface text-text-primary hover:bg-accent"}`,
155
+ "aria-label": k("toursList.gridView"),
156
+ title: k("toursList.gridView"),
157
+ children: /* @__PURE__ */ C(_, { size: 20 })
158
+ }), /* @__PURE__ */ C("button", {
163
159
  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 })
160
+ onClick: () => F("list"),
161
+ className: `px-3 py-2 min-h-[44px] ${M === "list" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-surface text-text-primary hover:bg-accent"}`,
162
+ "aria-label": k("toursList.listView"),
163
+ title: k("toursList.listView"),
164
+ children: /* @__PURE__ */ C(v, { size: 20 })
169
165
  })]
170
166
  })]
171
167
  })]
172
168
  }),
173
- U ? /* @__PURE__ */ x("div", {
169
+ ee ? /* @__PURE__ */ C("div", {
174
170
  className: "text-center py-12",
175
- children: /* @__PURE__ */ x("p", {
171
+ children: /* @__PURE__ */ C("p", {
176
172
  className: "text-sm sm:text-base text-text-secondary",
177
- children: w("toursList.loading")
173
+ children: k("toursList.loading")
178
174
  })
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",
175
+ }) : q.length > 0 ? /* @__PURE__ */ C("div", {
176
+ className: M === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4" : "space-y-3",
177
+ children: q.map((e) => {
178
+ let t = e.status, n = t === "DRAFT" && W, r = t === "PUBLISHED" && W, i = t !== "ARCHIVED" && G, a = [];
179
+ return n && a.push({
180
+ label: k("toursList.actionPublish"),
181
+ onSelect: () => void le(e.id)
182
+ }), r && a.push({
183
+ label: k("toursList.actionUnpublish"),
184
+ onSelect: () => void ue(e.id)
185
+ }), K && a.push({
186
+ label: k("toursList.actionDuplicate"),
187
+ onSelect: () => void fe(e.id)
188
+ }), i && a.push({
189
+ label: k("toursList.actionArchive"),
190
+ onSelect: () => void de(e.id)
191
+ }), U && a.push({
192
+ label: k("toursList.actionDelete"),
193
+ onSelect: () => void pe(e.id),
194
+ intent: "destructive"
195
+ }), /* @__PURE__ */ w(O, {
196
+ treatment: "plain",
197
+ className: "p-4 border-border-seam shadow-[var(--shadow-pop)]",
185
198
  children: [
186
- /* @__PURE__ */ S("div", {
199
+ /* @__PURE__ */ w("div", {
187
200
  className: "flex items-start justify-between mb-2",
188
- children: [/* @__PURE__ */ x("h3", {
201
+ children: [/* @__PURE__ */ C("h3", {
189
202
  className: "font-semibold text-text-primary",
190
- children: F ? /* @__PURE__ */ x("button", {
203
+ children: B ? /* @__PURE__ */ C("button", {
191
204
  type: "button",
192
205
  className: "cursor-pointer hover:text-primary bg-transparent border-0 p-0 text-left font-inherit",
193
- onClick: () => T(`${E}/${e.id}/edit`),
206
+ onClick: () => A(`${j}/${e.id}/edit`),
194
207
  children: e.name
195
208
  }) : e.name
196
- }), /* @__PURE__ */ x("span", {
209
+ }), /* @__PURE__ */ C("span", {
197
210
  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)
211
+ children: ce(t)
199
212
  })]
200
213
  }),
201
- e.description && /* @__PURE__ */ x("p", {
214
+ e.description && /* @__PURE__ */ C("p", {
202
215
  className: "text-sm text-text-secondary mb-3",
203
216
  children: e.description
204
217
  }),
205
- /* @__PURE__ */ S("div", {
218
+ /* @__PURE__ */ w("div", {
206
219
  className: "flex items-center justify-between text-xs text-text-secondary mb-3",
207
- children: [/* @__PURE__ */ S("span", { children: [
220
+ children: [/* @__PURE__ */ w("span", { children: [
208
221
  e.steps?.length || 0,
209
222
  " ",
210
- w("toursList.steps")
211
- ] }), /* @__PURE__ */ S("span", { children: [
223
+ k("toursList.steps")
224
+ ] }), /* @__PURE__ */ w("span", { children: [
212
225
  e.viewCount,
213
226
  " ",
214
- w("toursList.views")
227
+ k("toursList.views")
215
228
  ] })]
216
229
  }),
217
- /* @__PURE__ */ S("div", {
218
- className: "flex flex-wrap items-center gap-2 pt-3 border-t border-border-subtle",
230
+ /* @__PURE__ */ w("div", {
231
+ className: "flex flex-wrap items-center gap-2 pt-3 border-t border-border-seam",
219
232
  children: [
220
- I && /* @__PURE__ */ S("button", {
233
+ V && /* @__PURE__ */ w("button", {
221
234
  type: "button",
222
235
  onClick: (t) => {
223
- t.stopPropagation(), T(`${E}/${e.id}/steps`);
236
+ t.stopPropagation(), A(`${j}/${e.id}/steps`);
224
237
  },
225
238
  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")]
239
+ title: k("toursList.editStepsTitle"),
240
+ children: [/* @__PURE__ */ C(y, { size: 14 }), k("toursList.stepsButton")]
228
241
  }),
229
- L && /* @__PURE__ */ S("button", {
242
+ H && /* @__PURE__ */ w("button", {
230
243
  type: "button",
231
244
  onClick: (t) => {
232
- t.stopPropagation(), T(`${E}/${e.id}/preview`);
245
+ t.stopPropagation(), A(`${j}/${e.id}/preview`);
233
246
  },
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")]
247
+ 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",
248
+ title: k("toursList.previewTitle"),
249
+ children: [/* @__PURE__ */ C(g, { size: 14 }), k("toursList.previewButton")]
237
250
  }),
238
- F && /* @__PURE__ */ x("button", {
251
+ B && /* @__PURE__ */ C("button", {
239
252
  type: "button",
240
253
  onClick: (t) => {
241
- t.stopPropagation(), T(`${E}/${e.id}/edit`);
254
+ t.stopPropagation(), A(`${j}/${e.id}/edit`);
242
255
  },
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 })
256
+ className: "p-2 min-h-[44px] min-w-[44px] text-xs border border-border-seam rounded hover:bg-accent",
257
+ title: k("toursList.settingsTitle"),
258
+ "aria-label": k("toursList.settingsTitle"),
259
+ children: /* @__PURE__ */ C(S, { size: 14 })
247
260
  }),
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
- })
261
+ a.length > 0 && /* @__PURE__ */ C(D, { actions: a })
306
262
  ]
307
263
  })
308
264
  ]
309
265
  }, e.id);
310
266
  })
311
- }) : /* @__PURE__ */ S("div", {
267
+ }) : /* @__PURE__ */ w("div", {
312
268
  className: "text-center py-12 border border-dashed border-border-subtle rounded-md",
313
- children: [/* @__PURE__ */ x("p", {
269
+ children: [/* @__PURE__ */ C("p", {
314
270
  className: "text-sm sm:text-base text-text-secondary mb-2",
315
- children: w("toursList.emptyTitle")
316
- }), /* @__PURE__ */ x("p", {
271
+ children: k("toursList.emptyTitle")
272
+ }), /* @__PURE__ */ C("p", {
317
273
  className: "text-xs sm:text-sm text-text-secondary",
318
- children: w("toursList.emptySubtitle")
274
+ children: k("toursList.emptySubtitle")
319
275
  })]
320
276
  })
321
277
  ]
322
278
  });
323
279
  }
324
280
  //#endregion
325
- export { w as ToursListPage };
281
+ export { k as ToursListPage };
326
282
 
327
283
  //# sourceMappingURL=ToursListPage.js.map