import { property } from 'lit/decorators.js';
import { boolean } from '../../internal/boolean.mjs';
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
import { watch } from '../../internal/watch.mjs';
import styles from './divider.styles.mjs';

var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};
class FlowUiDivider extends FlowRdfElement {
  constructor() {
    super(...arguments);
    this.vertical = false;
  }
  connectedCallback() {
    super.connectedCallback();
    this.vertical = boolean(this.vertical, true);
    this.setAttribute("role", "separator");
  }
  handleVerticalChange() {
    this.setAttribute("aria-orientation", this.vertical ? "vertical" : "horizontal");
  }
  /*
    render() {
      return html`<div part="divider" class="divider"></div>`;
    }
  */
}
FlowUiDivider.styles = styles;
__decorateClass([
  property({ type: Boolean, reflect: true })
], FlowUiDivider.prototype, "vertical", 2);
__decorateClass([
  watch("vertical")
], FlowUiDivider.prototype, "handleVerticalChange", 1);

export { FlowUiDivider as default };
