import * as postcss from 'postcss'; import { NodeProps } from '../../node'; import type * as sassInternal from '../../sass-internal'; import { AnyIfConditionExpression, IfConditionExpression, IfConditionExpressionProps } from './index'; import { IfEntry } from '../if-entry'; import { RawWithValue } from '../../raw-with-value'; import { Container } from '../../container'; /** * The set of raws supported by {@link IfConditionOperation}. * * @category Expression */ export interface IfConditionOperationRaws { /** * The raws for each operator in the operation. * * `operator` is the text of the operator, which is only used if the operator * matches the given value. `before` is the whitespace before the operator, * `after` is the whitespace after it. */ operators?: Array<{ operator?: RawWithValue<'and' | 'or'>; before?: string; after?: string; } | undefined>; } /** * The initializer properties for {@link IfConditionOperation}. * * @category Expression */ export interface IfConditionOperationProps extends NodeProps { raws?: IfConditionOperationRaws; operator: 'and' | 'or'; nodes: Array; } /** * The type of new nodes that can be passed into an `if()` condition operation. * * @category Expression */ export type NewNodeForIfConditionOperation = AnyIfConditionExpression | ReadonlyArray | IfConditionExpressionProps | ReadonlyArray | undefined; /** * An `and` or `or` operation in an `if()` condition. * * @category Expression */ export declare class IfConditionOperation extends IfConditionExpression implements Container { #private; readonly sassType: "if-condition-operation"; raws: IfConditionOperationRaws; parent: IfEntry | AnyIfConditionExpression | undefined; /** The boolean operator. */ get operator(): 'and' | 'or'; set operator(operator: 'and' | 'or'); private _operator; get nodes(): ReadonlyArray; /** @hidden */ set nodes(nodes: Array); private _nodes?; constructor(defaults: IfConditionOperationProps); /** @hidden */ constructor(_: undefined, inner: sassInternal.IfConditionOperation); clone(overrides?: Partial): this; toJSON(): object; /** @hidden */ toJSON(_: string, inputs: Map): object; append(...nodes: NewNodeForIfConditionOperation[]): this; each(callback: (node: AnyIfConditionExpression, index: number) => false | void): false | undefined; every(condition: (node: AnyIfConditionExpression, index: number, nodes: ReadonlyArray) => boolean): boolean; index(child: AnyIfConditionExpression | number): number; insertAfter(oldNode: AnyIfConditionExpression | number, newNode: NewNodeForIfConditionOperation): this; insertBefore(oldNode: AnyIfConditionExpression | number, newNode: NewNodeForIfConditionOperation): this; prepend(...nodes: NewNodeForIfConditionOperation[]): this; push(child: AnyIfConditionExpression): this; removeAll(): this; removeChild(child: AnyIfConditionExpression | number): this; some(condition: (node: AnyIfConditionExpression, index: number, nodes: ReadonlyArray) => boolean): boolean; get first(): AnyIfConditionExpression | undefined; get last(): AnyIfConditionExpression | undefined; /** @hidden */ toString(): string; /** * Normalizes the many types of node that can be used with Interpolation * methods. */ private _normalize; /** Like {@link _normalize}, but also flattens a list of nodes. */ private _normalizeList; /** @hidden */ get nonStatementChildren(): ReadonlyArray; }