// ets_tracing: off
import { matchTag_ } from "@effect-ts/core/Utils";
import * as FontHorizontalLayout from "../../FigFont/HorizontalLayout/index.mjs"; // -----------------------------------------------------------------------------
// Constructors
// -----------------------------------------------------------------------------

export const FullWidth = {
  _tag: "FullWidth"
};
export const HorizontalFitting = {
  _tag: "HorizontalFitting"
};
export const HorizontalSmushing = {
  _tag: "HorizontalSmushing"
};
export const ForceHorizontalSmushing = {
  _tag: "ForceHorizontalSmushing"
};
export const FontDefault = {
  _tag: "FontDefault"
}; // -----------------------------------------------------------------------------
// Operations
// -----------------------------------------------------------------------------

/**
 * Converts the option `HorizontalLayout` into the `FigFont` parameter
 * `HorizontalLayout`.
 */

export function toInternalLayout_(self, font) {
  return matchTag_(self, {
    FullWidth: () => FontHorizontalLayout.FullWidth,
    HorizontalFitting: () => FontHorizontalLayout.HorizontalFitting,
    HorizontalSmushing: () => font.settings.hLayout,
    ForceHorizontalSmushing: () => font.settings.hLayout._tag === "ControlledSmushing" ? font.settings.hLayout : FontHorizontalLayout.UniversalSmushing,
    FontDefault: () => font.settings.hLayout
  });
}
/**
 * Converts the option `HorizontalLayout` into the `FigFont` parameter
 * `HorizontalLayout`.
 *
 * @ets_data_first toInternalLayout_
 */

export function toInternalLayout(font) {
  return self => toInternalLayout_(self, font);
}
//# sourceMappingURL=index.mjs.map