// =============================================================================
// POINTER/SCROLL PROPERTIES
// Additional properties for interactive/draggable elements
// NOTE: Core properties (--drag-x, --drag-y, --resize-x, --resize-y, --z-index)
//       are defined in lib/design/core/_properties.scss
// =============================================================================

@mixin xy-props($prefix, $x-suffix, $y-suffix, $x-value, $y-value, $syntax, $inherits: true) {
    @property --#{$prefix}#{$x-suffix} { initial-value: #{$x-value}; syntax: "#{$syntax}"; inherits: #{$inherits}; }
    @property --#{$prefix}#{$y-suffix} { initial-value: #{$y-value}; syntax: "#{$syntax}"; inherits: #{$inherits}; }
}

@mixin pair-props($prefix, $first-suffix, $second-suffix, $first-value, $second-value, $syntax, $inherits: true) {
    @property --#{$prefix}#{$first-suffix} { initial-value: #{$first-value}; syntax: "#{$syntax}"; inherits: #{$inherits}; }
    @property --#{$prefix}#{$second-suffix} { initial-value: #{$second-value}; syntax: "#{$syntax}"; inherits: #{$inherits}; }
}

// Pointer/page coordinates
@mixin pointer-coords { @include xy-props('client', '-x', '-y', 0, 0, '<number>'); }
@mixin page-coords    { @include xy-props('page', '-x', '-y', 0, 0, '<number>'); }

// Spatial coordinates (unique to misc)
@mixin sp-coords { @include xy-props('sp', '-x', '-y', 0px, 0px, '<length-percentage>'); }
@mixin ds-coords { @include xy-props('ds', '-x', '-y', 0px, 0px, '<length-percentage>'); }
@mixin r-coords  { @include xy-props('r', 'x', 'y', 0px, 0px, '<length-percentage>'); }
@mixin rs-coords { @include xy-props('rs', '-x', '-y', 0px, 0px, '<length-percentage>'); }

// Limit coords
@mixin limit-shift-coords { @include xy-props('limit-shift', '-x', '-y', '100%', '100%', '<length-percentage>'); }
@mixin limit-drag-coords  { @include xy-props('limit-drag', '-x', '-y', '100%', '100%', '<length-percentage>'); }

// Size properties
@mixin bound-size   { @include pair-props('bound-', 'inline-size', 'block-size', '100%', '100%', '<length-percentage>'); }
@mixin initial-size { @include pair-props('initial-', 'inline-size', 'block-size', '100%', '100%', '<length-percentage>'); }
@mixin frame-size   { @include pair-props('', 'inline-size', 'block-size', '100%', '100%', '<length-percentage>'); }

// Register unique properties only
@include pointer-coords;
@include page-coords;
@include sp-coords;
@include ds-coords;
@include r-coords;
@include rs-coords;
@include limit-shift-coords;
@include limit-drag-coords;
@include bound-size;
@include frame-size;
@include initial-size;

// Scroll properties (unique to this module)
@property --scroll-coef { syntax: "<number>"; initial-value: 1; inherits: true; }
@property --scroll-size { syntax: "<number>"; initial-value: 0; inherits: true; }
@property --content-size { syntax: "<number>"; initial-value: 0; inherits: true; }
@property --max-size { syntax: "<length-percentage>"; initial-value: 0px; inherits: true; }
