import React from 'react';
var VB = 100;
var STROKE = 1.9;
var PATH_LEN = 100;
var RADIUS = 6;

/** 方桌单条占用：外缘矩形边框进度（百分比同源底部横条） */
export function RoomCardRectEdgeProgress(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__rect-edge-progress",
    "aria-hidden": true
  }, /*#__PURE__*/React.createElement("svg", {
    viewBox: "0 0 ".concat(VB, " ").concat(VB),
    preserveAspectRatio: "none"
  }, /*#__PURE__*/React.createElement("rect", {
    x: STROKE / 2,
    y: STROKE / 2,
    width: VB - STROKE,
    height: VB - STROKE,
    rx: RADIUS,
    ry: RADIUS,
    pathLength: PATH_LEN,
    fill: "none",
    stroke: track,
    strokeWidth: STROKE,
    strokeLinejoin: "round"
  }), /*#__PURE__*/React.createElement("rect", {
    x: STROKE / 2,
    y: STROKE / 2,
    width: VB - STROKE,
    height: VB - STROKE,
    rx: RADIUS,
    ry: RADIUS,
    pathLength: PATH_LEN,
    fill: "none",
    stroke: strokeMain,
    strokeWidth: STROKE,
    strokeLinecap: "round",
    strokeLinejoin: "round",
    strokeDasharray: "".concat(clamped, " ").concat(PATH_LEN),
    transform: "rotate(-90 ".concat(VB / 2, " ").concat(VB / 2, ")"),
    style: {
      transition: 'stroke-dasharray 0.6s ease'
    }
  })));
}