import {
  DividerData_Alignment,
  DividerData_LineStyle,
  DividerData_Width,
  Node_Type
} from "./../../ricos-schema/legacy/wix/rich_content/v1/index.js";
import { isDefined } from "./utils.js";
const divider = (...args) => {
  const dividerData = args.find((a) => !("type" in a));
  return {
    type: "block_node",
    // @ts-ignore
    node: (getId) => {
      const nodes = args.map((arg) => "type" in arg && arg.type === "block_node" ? arg.node(getId) : void 0).filter(isDefined);
      return {
        id: getId(),
        type: Node_Type.DIVIDER,
        ...nodes?.length && { nodes },
        dividerData: dividerData ? dividerData : {
          lineStyle: DividerData_LineStyle.SINGLE,
          width: DividerData_Width.LARGE,
          alignment: DividerData_Alignment.CENTER
        }
      };
    }
  };
};
export {
  divider
};
//# sourceMappingURL=divider.builder.js.map
