import React from 'react';
var VB = 100;
var CX = 50;
var CY = 50;
var STROKE = 1.75;
/** 外缘贴齐容器：rx/ry + stroke/2 = viewBox 半径 50 */
var RX = 50 - STROKE / 2;
var RY = 50 - STROKE / 2;
/** 用 `pathLength=100` 让 dasharray 直接按百分比表达 */
var PATH_LEN = 100;

/** 圆桌单条占用：外缘环形进度（百分比同源底部横条） */
export function RoomCardDiscEdgeProgress(props) {
  var clamped = Math.min(100, Math.max(0, props.percent));
  var strokeMain = props.isTimeout ? '#f5c542' : 'var(--rc-pay-paid)';
  var track = 'rgba(0, 0, 0, 0.22)';
  return /*#__PURE__*/React.createElement("div", {
    className: "pisell-res-floor-room-card__disc-edge-progress",
    "aria-hidden": true
  }, /*#__PURE__*/React.createElement("svg", {
    viewBox: "0 0 ".concat(VB, " ").concat(VB),
    preserveAspectRatio: "none"
  }, /*#__PURE__*/React.createElement("ellipse", {
    cx: CX,
    cy: CY,
    rx: RX,
    ry: RY,
    pathLength: PATH_LEN,
    fill: "none",
    stroke: track,
    strokeWidth: STROKE
  }), /*#__PURE__*/React.createElement("ellipse", {
    cx: CX,
    cy: CY,
    rx: RX,
    ry: RY,
    pathLength: PATH_LEN,
    fill: "none",
    stroke: strokeMain,
    strokeWidth: STROKE,
    strokeLinecap: "round",
    strokeDasharray: "".concat(clamped, " ").concat(PATH_LEN),
    transform: "rotate(-90 ".concat(CX, " ").concat(CY, ")"),
    style: {
      transition: 'stroke-dasharray 0.6s ease'
    }
  })));
}