import React from 'react';
import { QueryLeafElem, QueryLeafBy, QueryLeafOp, QueryElem } from '../../lib/Query';
import { Chip, Typography } from '@material-ui/core';
import { QBQueryPlaceholder } from './QBQueryPlaceholder';
export interface ElemChipProps {
label: any
}
export function LabeledElemChip(props: ElemChipProps) {
const label = {props.label}
return
}
export interface LeafProps {
elem: QueryLeafElem
onReplace: (q: QueryElem) => void
}
export function QBQueryElemArtistEquals(props: LeafProps) {
return
}
export function QBQueryElemArtistLike(props: LeafProps) {
return
}
export function QBQueryElemTitleEquals(props: LeafProps) {
return
}
export function QBQueryElemTitleLike(props: LeafProps) {
return
}
export function QBQueryLeafElem(props: LeafProps) {
let e = props.elem;
if (e.a == QueryLeafBy.ArtistName &&
e.leafOp == QueryLeafOp.Equals &&
typeof e.b == "string") {
return
} else if (e.a == QueryLeafBy.ArtistName &&
e.leafOp == QueryLeafOp.Like &&
typeof e.b == "string") {
return
} if (e.a == QueryLeafBy.SongTitle &&
e.leafOp == QueryLeafOp.Equals &&
typeof e.b == "string") {
return
} else if (e.a == QueryLeafBy.SongTitle &&
e.leafOp == QueryLeafOp.Like &&
typeof e.b == "string") {
return
} else if (e.leafOp == QueryLeafOp.Placeholder) {
return
}
throw "Unsupported leaf element";
}