function DiscardUploadConfirm({ photos = 0, tagCount = 0, hasCaption, cols = 0, step = 1, onStay, onLeave }) {
  const lost = [
    photos ? { icon: 'photo', text: '고른 사진 ' + photos + '장' } : null,
    tagCount ? { icon: 'tag', text: '메뉴 태그 ' + tagCount + '개' } : null,
    hasCaption ? { icon: 'text-caption', text: '작성한 본문' } : null,
    cols ? { icon: 'bookmarks', text: '선택한 컬렉션 ' + cols + '개' } : null,
    step >= 2 ? { icon: 'map-pin', text: '확인한 음식점' } : null
  ].filter(Boolean);
  return (
    <div style={{ position: 'fixed', inset: 0, background: 'rgba(20,20,20,.5)', display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 26, zIndex: 95 }}>
      <div style={{ width: '100%', background: 'var(--surface-1)', borderRadius: 22, padding: '26px 22px 22px', boxShadow: 'var(--shadow-float)', boxSizing: 'border-box' }}>
        <div style={{ width: 54, height: 54, borderRadius: '50%', background: 'var(--bg-warning)', display: 'flex', alignItems: 'center', justifyContent: 'center', margin: '0 auto 15px' }}><i className="ti ti-file-off" style={{ fontSize: 24, color: 'var(--text-warning)' }}></i></div>
        <span style={{ font: 'var(--text-heading)', display: 'block', textAlign: 'center', marginBottom: 8 }}>작성을 그만둘까요?</span>
        <p style={{ font: 'var(--text-caption)', color: 'var(--text-secondary)', textAlign: 'center', margin: '0 0 18px', lineHeight: 1.6, textWrap: 'pretty' }}>지금 나가면 여기까지 쓴 내용은 저장되지 않아요. 임시 저장은 아직 없어요.</p>
        {lost.length > 0 && (
          <div style={{ display: 'flex', flexDirection: 'column', gap: 10, background: 'var(--surface-2)', borderRadius: 'var(--radius-tile)', padding: '15px 16px', marginBottom: 20 }}>
            {lost.map(l => (
              <div key={l.text} style={{ display: 'flex', gap: 10 }}>
                <i className={'ti ti-' + l.icon} style={{ fontSize: 15, color: 'var(--text-secondary)', flexShrink: 0, marginTop: 2 }}></i>
                <span style={{ font: 'var(--text-small)', color: 'var(--text-secondary)', lineHeight: 1.55 }}>{l.text}</span>
              </div>
            ))}
            <div style={{ display: 'flex', gap: 10, borderTop: '1px solid var(--border)', paddingTop: 10 }}>
              <i className="ti ti-device-mobile" style={{ fontSize: 15, color: 'var(--text-muted)', flexShrink: 0, marginTop: 2 }}></i>
              <span style={{ font: 'var(--text-small)', color: 'var(--text-muted)', lineHeight: 1.55 }}>기기에 있는 사진은 지워지지 않아요</span>
            </div>
          </div>
        )}
        <div style={{ display: 'flex', flexDirection: 'column', gap: 9 }}>
          <span onClick={onStay} style={{ textAlign: 'center', font: '600 15px/1 var(--font-family)', color: '#fff', background: 'var(--text-primary)', borderRadius: 999, padding: '17px 0', cursor: 'pointer' }}>이어서 작성하기</span>
          <span onClick={onLeave} style={{ textAlign: 'center', font: '600 15px/1 var(--font-family)', color: 'var(--text-danger)', background: 'transparent', borderRadius: 999, padding: '15px 0', cursor: 'pointer' }}>저장하지 않고 나가기</span>
        </div>
      </div>
    </div>
  );
}
window.DiscardUploadConfirm = DiscardUploadConfirm;
