import type { Component } from 'solid-js' import { Logger } from 'besonders-logger' import { createSignal } from 'solid-js' import { useAgent } from '../../data/agent/AgentState' import { useSearchContext } from '../../data/search' import { useAtTags, useHashTags, usePlusTags } from '../../ui/reactive' import { TagSettingsDialog } from '../bars/Sidebar' import { TagsList } from '../TagsList' const { WARN, LOG, DEBUG, VERBOSE, ERROR } = Logger.setup(Logger.INFO) // eslint-disable-line unused-imports/no-unused-vars export const TagSettings: Component<{}> = () => { DEBUG('Creating ') // HACK used to render twice and sideEffects should only happen once if possible const agent = useAgent() // ? are there reactivity reasons not to destructure here? const plusTags = usePlusTags() const hashTags = useHashTags() const atTags = useAtTags() const [search, setSearch] = useSearchContext() const [sort, setSort] = createSignal<'count' | 'name'>('count') const [chosenTagString, setTagString] = createSignal('') const [settingsOpen, setOpen] = createSignal(false) const onClickTagSettings = (tagType: string, tag: string) => { // TODO avoid this code duplication (if possible: without terribly awkward signal prop passing) const tagWithPrefix = `${tagType}${tag}` LOG('onClickTagSettings', tagWithPrefix) setTagString(tagWithPrefix) setOpen(true) } function onClickTag(type: string, tag: string) { setSearch(type + tag) } return (

Sort by:

setSort('count')} variant={sort() === 'count' ? 'primary' : 'default'}>Count setSort('name')} variant={sort() === 'name' ? 'primary' : 'default'}>Name { /*
Your tags{/* {`(${agent.ag})`} * /}
*/ } {/*
Mergable Tags
*/}
Footer ?
) }