/* 공용 "상세 수치" 접기 — 550 / H1 / 앱푸시 세 에디터 공유. 토글 UI·펼침 상태 단일 관리.
   props.recline : 좌측에 표시할 등급 문구 JSX(예: ● 인식 양호 — 유효 노출 기준). 없으면 좌측 빈칸.
   props.children: 접히는 수치 행(렌더러마다 다름).
   → recline 줄 오른쪽 끝(기존 "유효 노출 기준" 자리)에 '상세 수치 보기/접기' 토글을 붙이고,
     펼치면 그 아래 .ap-metrics 로 행을 노출한다.
   plain JS(React.createElement) — babel 불필요, 앱 스크립트보다 먼저 로드. */
(function () {
  'use strict';
  var h = React.createElement;
  function APMetFold(props) {
    var st = React.useState(false);
    var isOpen = st[0], setOpen = st[1];
    return h(React.Fragment, null,
      h('div', { className: 'ap-recline', style: { display: 'flex', alignItems: 'center', gap: '7px', marginTop: '12px' } },
        props.recline || null,
        h('button', {
          type: 'button', className: 'ap-metrics-toggle',
          onClick: function () { setOpen(function (o) { return !o; }); },
          style: { marginLeft: 'auto', display: 'inline-flex', alignItems: 'center', gap: '4px', border: 0, background: 'transparent', cursor: 'pointer', font: 'inherit', fontSize: '11px', fontWeight: 700, color: '#9a9aa6', letterSpacing: '-0.01em' }
        },
          '상세 수치 ' + (isOpen ? '접기' : '보기'),
          h('svg', { width: 11, height: 11, viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 2.6, strokeLinecap: 'round', strokeLinejoin: 'round', style: { transform: isOpen ? 'rotate(90deg)' : 'none', transition: 'transform .12s' } },
            h('path', { d: 'M9 18l6-6-6-6' }))
        )
      ),
      isOpen ? h('div', { className: 'ap-metrics' }, props.children) : null
    );
  }
  window.APMetFold = APMetFold;
})();
