export const sel = {
  app: '.v10-app',
  appBody: '.v10-app-body',

  header: {
    root: '.v10-header',
    logo: '.v10-header-logo',
    logoText: '.v10-header-logo-text',
    version: '.v10-header-logo-version',
    sidebarToggle: 'button[title="Toggle sidebar"]',
    agentName: '.v10-header-agent-name',
    statusDot: '.v10-header-status-dot',
    meta: '.v10-header-meta',
    notifWrap: '.v10-header-notif-wrap',
    notifBadge: '.v10-header-notif-badge',
    notifDropdown: '.v10-header-notif-dropdown',
    notifTitle: '.v10-header-notif-title',
    notifEmpty: '.v10-header-notif-empty',
    notifItem: '.v10-header-notif-item',
    notifItemText: '.v10-header-notif-item-text',
    notifItemTime: '.v10-header-notif-item-time',
    themeToggle: 'button[title*="Switch to"]',
    rightPanelToggle: 'button[title="Toggle agent panel"]',
    actions: '.v10-header-actions',
  },

  leftPanel: {
    root: '.v10-panel-left',
    treeHeader: '.v10-tree-header',
    modeBtn: '.v10-tree-mode-btn',
    // `.v10-collapse-btn` was removed in PR8 — the in-panel ◂ triangle
    // duplicated the always-visible global header toggle. Use the
    // global header `sidebarToggle` instead. `.v10-tree-section-badge`
    // and `.v10-tree-chevron` were also removed; the per-project
    // chevron-expand pattern no longer exists. Broader e2e
    // modernization is a standalone follow-up (chevron-expand /
    // memory-layer rows / fixture CG names — all gone for multiple
    // PRs); this PR only triages the cases its removals directly broke.
    treeContent: '.v10-tree-content',
    dashboard: '.v10-tree-dashboard',
    newProjectBtn: '.v10-new-project-btn',
    emptyCard: '.v10-journey-empty-card',
    emptyTitle: '.v10-jec-title',
    emptyHint: '.v10-jec-hint',
    section: '.v10-tree-section',
    sectionHeader: '.v10-tree-section-header',
    sectionLabel: '.v10-tree-section-label',
    treeItems: '.v10-tree-items',
    treeItem: '.v10-tree-item',
    itemLabel: '.v10-tree-item-label',
    layerHeader: '.v10-tree-layer-header',
    oraclePlaceholder: '.v10-oracle-placeholder',
    integrationDot: '.v10-tree-integration-dot',
    // PR8 sibling-section pattern (My Context Graphs + Integrations):
    peerGroup: '.v10-peer-group',
    peerGroupHeader: '.v10-peer-group-header',
    peerGroupLabel: '.v10-peer-group-label',
    peerGroupBody: '.v10-peer-group-body',
  },

  center: {
    root: '.v10-panel-center',
    tabs: '.v10-center-tabs',
    tab: '.v10-center-tab',
    tabLabel: '.v10-center-tab-label',
    tabClose: '.v10-center-tab-close',
    content: '.v10-center-content',
    placeholder: '.v10-view-placeholder',
  },

  bottom: {
    root: '.v10-panel-bottom',
    tabs: '.v10-bottom-tabs',
    tab: '.v10-bottom-tab',
    toggle: '.v10-bottom-toggle',
    content: '.v10-bottom-content',
    logContainer: '.v10-log-container',
    logFilter: '.v10-log-filter',
    logOutput: '.v10-log-output',
    logLine: '.v10-log-line',
  },

  rightPanel: {
    root: '.v10-panel-right',
    modeTab: '.v10-agent-mode-tab',
    subtab: '.v10-agent-subtab',
    subtabGroup: '.v10-agent-subtab-group',
    addBtn: '.v10-agent-subtab.add',
    chatInput: '.v10-agent-input',
    sendBtn: '.v10-agent-send-btn',
    chatMessages: '.v10-chat-messages',
    chatBubble: '.v10-chat-bubble',
    agentCard: '.v10-agent-card',
    connectBtn: '.v10-agent-send-btn.secondary',
    tabMenuTrigger: '.v10-agent-tab-menu-trigger',
    tabMenuPopover: '.v10-agent-tab-menu-popover',
    tabMenuItem: '.v10-agent-tab-menu-item',
    tabMenuItemDanger: '.v10-agent-tab-menu-item.danger',
    sessionItem: '.v10-session-item',
    warning: '.v10-local-agent-warning',
    projectSelect: '.v10-local-agent-target-select',
    projectSelectTrigger: '.v10-local-agent-target-select .v10-select-trigger',
    // The Select menu/options portal to document.body (createPortal), so
    // they're NOT descendants of `.v10-local-agent-target-select`. Use
    // top-level selectors so Playwright actually finds them when the
    // picker is open.
    projectSelectMenu: '.v10-select-menu',
    projectSelectOption: '.v10-select-option',
    // PR2 composer (TextareaAutosize + lucide icons + react-dropzone)
    composerShell: '.v10-local-agent-composer-shell',
    composerAttach: '.v10-composer-attach',
    composerControls: '.v10-composer-controls',
    composerTarget: '.v10-composer-target',
    sendBtnInline: '.v10-local-agent-inline-send',
    sendBtnAria: 'button[aria-label="Send message"]',
    attachmentChips: '.v10-attachment-chips',
    attachmentChip: '.v10-attachment-chip',
    attachmentChipRemove: '.v10-attachment-chip-remove',
    attachmentChipStatus: '.v10-attachment-chip-status',
    messagesRegion: '.v10-local-agent-messages',
    dropOverlay: '.v10-drop-overlay',
    dropOverlayAccept: '.v10-drop-overlay.active.accept',
    dropOverlayRefuse: '.v10-drop-overlay.active.refuse',
    // PR3 markdown rendering (react-markdown + remark-gfm + shiki)
    markdownRoot: '.v10-md',
    markdownParagraph: '.v10-md-p',
    markdownLink: 'a.v10-md-link',
    markdownInlineCode: 'code.v10-md-code',
    markdownTable: '.v10-md-table',
    markdownTableScroll: '.v10-md-table-scroll',
    markdownBlockquote: 'blockquote.v10-md-blockquote',
    markdownPre: '.v10-md-pre',
    markdownPreFallback: '.v10-md-pre-fallback',
    markdownPreRendered: '.v10-md-pre-rendered',
    markdownCopy: '.v10-md-copy',
    markdownCopyAnnounce: '.v10-md-copy-announce',
  },

  dashboard: {
    root: '.v10-dashboard',
    title: '.v10-dash-title',
    subtitle: '.v10-dash-subtitle',
    stats: '.v10-dash-stats',
    statCard: '.stat-card',
    statLabel: '.stat-label',
    statValue: '.stat-value',
    quickAction: '.v10-quick-action',
    quickActionIcon: '.v10-quick-action-icon',
    sectionHeader: '.v10-dash-section-header',
    sectionLink: '.v10-dash-section-link',
    recentOp: '.v10-recent-op',
    recentOpType: '.v10-recent-op-type',
    recentOpStatus: '.v10-recent-op-status',
    projectCard: '.v10-dash-project-card',
    projectName: '.v10-dash-project-name',
    projectCount: '.v10-dash-project-count',
  },

  modal: {
    overlay: '.v10-modal-overlay',
    box: '.v10-modal-box',
    header: '.v10-modal-header',
    title: '.v10-modal-title',
    subtitle: '.v10-modal-subtitle',
    body: '.v10-modal-body',
    footer: '.v10-modal-footer',
    btn: '.v10-modal-btn',
    btnPrimary: '.v10-modal-btn.primary',
    error: '.v10-modal-error',
    tip: '.v10-modal-tip',
    formGroup: '.v10-form-group',
    formLabel: '.v10-form-label',
    formInput: '.v10-form-input',
    formTextarea: '.v10-form-textarea',
    formSelect: '.v10-form-select',
    formRadio: '.v10-form-radio',
    advancedToggle: '.v10-form-advanced-toggle',
    advancedBody: '.v10-form-advanced-body',
    advChevron: '.v10-form-adv-chevron',
    layerPreview: '.v10-layer-preview',
  },

  importModal: {
    dropzone: '.v10-import-dropzone',
    dropzoneLabel: '.v10-import-dropzone-label',
    fileList: '.v10-import-file-list',
    fileItem: '.v10-import-file-item',
    fileName: '.v10-import-file-name',
    fileSize: '.v10-import-file-size',
    fileRemove: '.v10-import-file-remove',
    option: '.v10-import-option',
    progress: '.v10-import-progress',
    progressBar: '.v10-import-progress-bar',
    result: '.v10-import-result',
  },

  resizeHandle: '.v10-resize-handle-h',
} as const;
