import { LitElement, html, css, svg } from 'https://cdn.jsdelivr.net/gh/lit/dist@3/core/lit-core.min.js';
export class FieldIcon extends LitElement {
static properties = {
indexed: { type: Boolean }
};
static styles = css`
:host {
display: inline-flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
}
svg {
width: 16px;
height: 16px;
}
.indexed {
fill: var(--success);
color: var(--success);
opacity: 1;
}
.not-indexed {
fill: var(--text-secondary);
color: var(--text-secondary);
opacity: 0.6;
}
`;
constructor() {
super();
this.indexed = false;
}
render() {
if (this.indexed) {
// 闪电图标 - 已索引(快速)
return html`
`;
} else {
// 圆点图标 - 未索引
return html`
`;
}
}
}
customElements.define('srdb-field-icon', FieldIcon);