const { inject, computed } = Vue; export default { name: 'AgentCell', props: { agent: { type: Object, required: true } }, setup(props) { const appState = inject('appState'); const compactClass = computed(() => appState.isCompact.value ? 'agent-cell-compact' : ''); const nameClass = computed(() => appState.isCompact.value ? 'agent-cell-name-compact' : 'agent-cell-name'); const highlightBtnClass = computed(() => [ 'agent-cell-highlight-btn', appState.highlightedRowId.value === props.agent.id ? 'agent-cell-highlight-btn-active' : '' ]); return { ...appState, compactClass, nameClass, highlightBtnClass }; }, template: `
{{ agent.name }}
{{ agent.role }}
{{ highlightedRowId === agent.id ? 'Turn off reading mode' : 'Highlight Row' }}
` };