export function toCodeDimension(value) {
    switch (value.mode) {
        case "px":
            return `Dim.px(${value.value})`;
        case "fit":
            return `Dim.fit()`;
        case "fill":
            return `Dim.fill(${!(value.value === 1 ||
                value.value === 0 ||
                value.value === undefined ||
                value.value === null)
                ? value.value
                : ""})`;
        case "%":
            return `Dim.percent(${value.value})`;
        case "columns":
            return `Dim.col(${value.value})`;
        case "rows":
            return `Dim.row(${value.value})`;
    }
}
//# sourceMappingURL=to-code-dimensions.js.map